-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from lovyan03/develop
0.4.3
- Loading branch information
Showing
103 changed files
with
3,440 additions
and
789 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cmake_minimum_required (VERSION 3.8) | ||
project(LGFXOpenCV) | ||
|
||
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>") | ||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") | ||
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/Zc:__cplusplus>") | ||
|
||
file(GLOB Target_Files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS | ||
*.cpp | ||
LovyanGFX/src/lgfx/Fonts/efont/*.c | ||
LovyanGFX/src/lgfx/Fonts/IPA/*.c | ||
LovyanGFX/src/lgfx/utility/*.c | ||
LovyanGFX/src/lgfx/v1/*.cpp | ||
LovyanGFX/src/lgfx/v1/misc/*.cpp | ||
LovyanGFX/src/lgfx/v1/panel/*.cpp | ||
LovyanGFX/src/lgfx/v1/platforms/opencv/*.cpp | ||
) | ||
add_executable (LGFXOpenCV ${Target_Files}) | ||
|
||
target_compile_features(LGFXOpenCV PUBLIC cxx_std_17) | ||
target_include_directories(LGFXOpenCV PUBLIC "LovyanGFX/src/") | ||
target_include_directories(LGFXOpenCV PUBLIC "C:/opencv/build/include") | ||
target_link_libraries(LGFXOpenCV PUBLIC "C:/opencv/build/x64/vc15/lib/opencv_world452d.lib" ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include <stdio.h> // for drawBmpFile / drawJpgFile / drawPngFile | ||
|
||
#define LGFX_USE_V1 | ||
#include <LovyanGFX.hpp> | ||
#include <LGFX_AUTODETECT.hpp> | ||
|
||
LGFX lcd ( 320, 240 ); | ||
LGFX lcd2( 135, 240 ); | ||
|
||
int32_t target_x = 160 * 256; | ||
int32_t target_y = 120 * 256; | ||
int32_t current_x = 0; | ||
int32_t current_y = 0; | ||
int32_t add_x = 0; | ||
int32_t add_y = 0; | ||
|
||
void setup() | ||
{ | ||
lcd.init(); | ||
lcd2.init(); | ||
} | ||
|
||
void loop() | ||
{ | ||
static int i; | ||
++i; | ||
lcd.fillCircle(current_x >> 8, current_y >> 8, 5, i); | ||
current_x += add_x; | ||
current_y += add_y; | ||
add_x += (current_x < target_x) ? 1 : -1; | ||
add_y += (current_y < target_y) ? 1 : -1; | ||
lgfx::touch_point_t new_tp; | ||
if (lcd.getTouch(&new_tp)) | ||
{ | ||
target_x = new_tp.x * 256; | ||
target_y = new_tp.y * 256; | ||
lcd.drawCircle(new_tp.x, new_tp.y, 5, TFT_WHITE); | ||
} | ||
lgfx::delay(1); | ||
|
||
lcd2.fillRect(i & 127, i >> 7, 16, 16, i); | ||
// lcd2.drawJpgFile("C:\\test.jpg", i & 127, i >> 7); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <opencv2/opencv.hpp> | ||
#include <thread> | ||
|
||
#define LGFX_USE_V1 | ||
#include <LovyanGFX.hpp> | ||
#include <LGFX_AUTODETECT.hpp> | ||
|
||
void setup(void); | ||
void loop(void); | ||
|
||
void loopThread(void) | ||
{ | ||
setup(); | ||
for (;;) | ||
{ | ||
loop(); | ||
std::this_thread::yield(); | ||
} | ||
} | ||
|
||
int main(int, char**) | ||
{ | ||
std::thread sub_thread(loopThread); | ||
for (;;) | ||
{ | ||
std::this_thread::yield(); | ||
lgfx::Panel_OpenCV::imshowall(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.