Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ description: Graphics library for M5Stack series
issues: https://github.com/m5stack/M5GFX/issues
repository: https://github.com/m5stack/M5GFX.git
url: https://github.com/m5stack/M5GFX.git
version: 0.2.25
version: 0.2.26
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type": "git",
"url": "https://github.com/m5stack/M5GFX.git"
},
"version": "0.2.25",
"version": "0.2.26",
"frameworks": ["arduino", "espidf", "*"],
"platforms": ["espressif32", "native"],
"headers": "M5GFX.h"
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=M5GFX
version=0.2.25
version=0.2.26
author=M5Stack
maintainer=M5Stack
sentence=Library for M5Stack All Display
Expand Down
310 changes: 226 additions & 84 deletions src/M5GFX.cpp

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/lgfx/boards.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ namespace lgfx // This should not be changed to "m5gfx"
, board_M5CoreP4X = 31
, board_M5ChainCaptain = 32
, board_M5ToughC5 = 33
, board_M5PaperDIY = 34

/// non display boards
, board_M5AtomLite = 128
Expand Down
9 changes: 8 additions & 1 deletion src/lgfx/utility/pgmspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ Original Source:
#endif

#if !defined ( pgm_read_3byte_unaligned )
#define pgm_read_3byte_unaligned(addr) (pgm_read_dword_unaligned(addr) & 0xFFFFFFu)
#if defined ( pgm_read_dword_with_offset )
#define pgm_read_3byte_unaligned(addr) (pgm_read_dword_unaligned(addr) & 0xFFFFFFu)
#else
#define pgm_read_3byte_unaligned(addr) (uint32_t) \
( (uint32_t)pgm_read_byte((const uint8_t *)(addr) ) \
| (uint32_t)pgm_read_byte((const uint8_t *)(addr) + 1) << 8 \
| (uint32_t)pgm_read_byte((const uint8_t *)(addr) + 2) << 16 )
#endif
#endif

#if defined ( ESP8266 ) || defined (__SAMD21__) || defined(__SAMD21G18A__) || defined(__SAMD21J18A__) || defined(__SAMD21E17A__) || defined(__SAMD21E18A__) || defined(ARDUINO_ARCH_MBED_RP2040) || defined(ARDUINO_ARCH_RP2040) || defined(USE_PICO_SDK)
Expand Down
11 changes: 6 additions & 5 deletions src/lgfx/v1/LGFX_Sprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,14 +709,15 @@ namespace lgfx
setColorDepth(bpp < 32 ? bpp : 24);
uint32_t w = bmpdata.biWidth;
int32_t h = bmpdata.biHeight; // bcHeight Image height (pixels)
if (!createSprite(w, h)) return false;

//If the value of Height is positive, the image data is from bottom to top
//If the value of Height is negative, the image data is from top to bottom.
int32_t flow = (h < 0) ? 1 : -1;
int32_t y = 0;
if (h < 0) h = -h;
else y = h - 1;
if (h == INT32_MIN) return false;
bool top_down = h < 0;
if (top_down) h = -h;
if (!createSprite(w, h)) return false;
int32_t flow = top_down ? 1 : -1;
int32_t y = top_down ? 0 : h - 1;

if (bpp <= 8) {
if (!_palette) createPalette();
Expand Down
2 changes: 1 addition & 1 deletion src/lgfx/v1/gitTagVersion.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define LGFX_VERSION_MAJOR 1
#define LGFX_VERSION_MINOR 2
#define LGFX_VERSION_PATCH 25
#define LGFX_VERSION_PATCH 26
#define LOVYANGFX_VERSION F( LGFX_VERSION_MAJOR "." LGFX_VERSION_MINOR "." LGFX_VERSION_PATCH )
2 changes: 2 additions & 0 deletions src/lgfx/v1/misc/pixelcopy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ namespace lgfx
: copy_rgb_affine<bgr666_t, TSrc>)
: (dst_depth == grayscale_8bit) ? copy_rgb_affine<grayscale_t, TSrc>
: (dst_depth == rgb565_nonswapped) ? copy_rgb_affine<rgb565_t, TSrc>
: (dst_depth == argb8888_nonswapped) ? copy_rgb_affine<argb8888_t, TSrc>
: (dst_depth == argb8888_4Byte) ? copy_rgb_affine<bgra8888_t, TSrc>
: nullptr;
}

Expand Down
Loading
Loading