Commit Graph

82 Commits

Author SHA1 Message Date
Bodmer dc114db01b Srite class updates + others
Add 2 new pushSprite functions:
1. Sprite to sprite
2. windowed are of sprite to screen
Examples to follow
Bug fixes to sprite class
2020-08-05 20:06:44 +01:00
Bodmer c124688ab1
Fix #697
Untested but looks correct!
2020-07-19 10:45:36 +01:00
Bodmer a6d50ea5ef #682 Add created() function for sprites
New function added:
  bool created(void);
to check if sprite has been rotated. Example:

if ( !spr.created() ) Serial.println("Sprite has not been created");
2020-07-07 00:52:55 +01:00
Bodmer 61f1c5f98e
Merge pull request #641 from kamorris/kamorris-patch-1
Add 4bit images to sprites, with an example and a tool to produce the images from bmp files.
2020-06-19 10:05:01 +01:00
Bodmer b5826586fc Allow 4bpp Sprites to be rotated
4bpp Sprites can now be pushed to the TFT with a rotation
2020-06-05 16:05:04 +01:00
kamorris 5ffd4feac4 prepare for merging. 2020-05-25 17:09:56 -07:00
Bodmer 00ac129667 Update Sprite.cpp 2020-05-05 21:36:05 +01:00
Bodmer f6748bf906 Add ESP32 SPI DMA capability
DMA test examples now work on ESP32
2020-05-05 21:21:28 +01:00
Bodmer 90af737fa1 Fix #606 inconsistency + others
TFT_eFEX also needs updating so Rotated_Sprite_3 example renders correctly.

pushImage for FLASH images updated so partly off-screen images are correctly rendered.
2020-04-26 17:05:19 +01:00
Bodmer e937a3496f Diagnostic sketch update + others
Read_User_Setup updated to be compatible with STM32 and new structure format.
Reduction in compiler warnings
Update Sprite destructor
Update version to 2.2.1
2020-04-16 14:33:42 +01:00
Bodmer 875b451590 Fix Sprite 1bpp scroll bug
Sprite scroll function fixed for 1bpp
readPixelValue() updated

Performance of circle drawing functions improved.

Version raised to 2.2.0
2020-03-30 21:51:26 +01:00
Bodmer 5ab0a08d1d Fix #588 2020-03-29 18:42:25 +01:00
Bodmer 89bf0ce6c1 Fix #581 plus
Update 4 bit Sprite code
Update Animate_Dial example to use italic font with minimised character set, add original jpeg graphic.
Raise to 2.1.8
2020-03-25 14:27:38 +00:00
Bodmer 611ca4b223
Update Sprite.cpp 2020-03-20 02:30:26 +00:00
Bodmer 7f7cc24b00 Add new animated dial example
See Sprite "Animated_dial" example.
2020-03-20 00:30:12 +00:00
Bodmer bdf2c9ba75
Fix #572 2020-03-19 22:20:48 +00:00
Bodmer 0161814c9a Add smooth font wrapping in a Sprite
See #558
2020-03-01 18:40:54 +00:00
Bodmer db7a9987d3 Increase precision for Sprite to Sprite rotations
Based on pull request #543
2020-02-16 17:06:58 +00:00
Bodmer 83d202dd08
Merge pull request #543 from lovyan03/master
update: pushRotated tweak.
2020-02-16 16:57:28 +00:00
Bodmer 0fd8803ba2 Add smooth fonts in program memory for ESP32/8266
The 4 new smooth font  "Font_Demo_1/2/3/4_Array" examples now work on ESP32 and ESP8266.
2020-02-15 23:58:21 +00:00
Bodmer 771b52f841
Fix #546 2020-02-15 11:28:31 +00:00
Bodmer c689b4211d Add FLASH based anti-aliased fonts
Processors (such as STM32) that are not supported by a SPIFFS library can now use anti-aliased (smooth) fonts stored in FLASH (program) memory.
2020-02-14 23:54:37 +00:00
lovyan03 39fe08f987 update: pushRotated tweak. 2020-02-11 12:50:04 +09:00
Bodmer 443be934a7 Add PSRAM switch
Typical use to disable use of PSRAM for the sprite storage:
sprite.setAttribute(PSRAM_ENABLE, false); // true to enable
Minor update for recent button class update
2020-02-06 20:34:36 +00:00
Bodmer 87aca91218 Merge branch 'master' of https://github.com/Bodmer/TFT_eSPI 2020-02-06 13:38:13 +00:00
Bodmer 15c137633a Raise version add comments for button update 2020-02-06 13:38:03 +00:00
Bodmer 7841015043 Revert "Revert "Merge pull request #540 from justcallmekoko/master""
This reverts commit 38a057762f.
2020-02-06 13:20:17 +00:00
Just Call Me Koko b734b81e6b Fix center aligned button text 2020-02-05 22:21:02 -05:00
Bodmer 38a057762f Revert "Merge pull request #540 from justcallmekoko/master"
This reverts commit 6dec790e8d, reversing
changes made to 8146ac3015.
2020-02-06 01:43:42 +00:00
justcallmekoko 2b1147c6e8 Add setLabelDatum 2020-02-05 14:13:58 -05:00
Bodmer c8530d7ae4 4 bpp Sprite bug fix
OR has precedence over AND so brackets needed.
Remove unused varaible.
2020-02-01 01:43:16 +00:00
Bodmer 8209c00316 Add new alphaBlend functions
Added 24 bit colour handling alphaBlend to reduce precision loss in multiple blend stages (e.g. in 2D colour gradients). Added option for alpha dither to reduce colour banding in gradients with 16 bit colours.

Get rid of compile warnings.
2020-01-30 16:01:36 +00:00
Bodmer 0e0fd75277 Raise to version 2.0.0
The library has been cleaned up as it has got a bit untidy due to the large number of small incremental changes.

4bit Sprite examples renaed to be consistent with others.

alphaBlend example moved to generic folder (alphaBlend fn was moved to TFT_eSPI class).
Added sections + explanatory comments to functions prototypes.

Temporary comments added for potential gotchas for noobs when using DMA.

spi_begin/end functions renamed to reflect functionality. Old fns  retained for backwards compatibility with user setup.h files.
2020-01-26 21:17:49 +00:00
kamorris 7fd29d509f Suggested changes from code review
Set font for Transparent_Sprite_Demo_Colormap to correct value (4)
renamed setColorMap to createPalette
renamed cmpPixel to readPixelValue
added setPaletteColor / getPaletteColor
added error check to createPalette
2020-01-25 12:49:29 -08:00
kamorris e019b6dcf6 added color maps and examples 2020-01-24 22:07:45 -08:00
Bodmer 7f53a571f4 Add STM32 and generic processor support 2020-01-11 23:32:10 +00:00
Bodmer 8342507233 Remove scrap drivers, fix Sprite destructor 2020-01-11 01:27:51 +00:00
Bodmer 1476da56ba Restructured code, added ST7796
RPi MHS-4.0 inch Display-B type display now supported.
2020-01-11 00:58:38 +00:00
Bodmer 10078c8325
Fix #473
Update to accommodate smooth font rendering, which need a background colour specified.
2019-11-27 02:36:17 +00:00
lovyan03 7b71a3d8b5 Add: TFT_eSprite destructor. 2019-11-21 15:19:33 +09:00
Bodmer 5bb14ba2d8 Add new callback for smooth font antialiasing
Callback allows anitaliased fonts to be rendered over colour gradients
or images.
"Smooth_font_reading_TFT" example added
"Smooth_font_gradient" example added
Minor changes to avoid signed/unsigned comparison warnings.
2019-11-10 02:23:22 +00:00
Bodmer bd23626b53 Correct coordinate cropping in Sprite 2019-10-22 23:01:33 +01:00
Bodmer d3210a7ee6 Fix #417 and add for 135x240 display
Setup 135 is for TTGO T Display (ESP32)
Plus minor tweaks to avoid some warnings
2019-10-07 17:56:17 +01:00
Bodmer 4a38aa6aec Correct issue #398 2019-07-30 17:59:08 +01:00
Bodmer 00bf69fc48 Correct #400 and #402 + other tweaks
Corrected font 2 rendering issue #402
Corrected NULL pointer issue #400
Changed grave ` character (key for this character is left of numeral 1
key) to degree symbol in font 2
Change setup24 so DC pin is not D3
2019-07-30 15:56:55 +01:00
Bodmer ab5e407e2e
Merge pull request #366 from ImpulseAdventure/Fix_getTouch_bounds
Fix getTouch() return status upon bounds overflow
2019-06-11 19:42:45 +01:00
Bodmer da349a5fbd Minor changes 2019-06-03 23:31:04 +01:00
Calvin Hass a627c51118
Fix getTouch() return status upon bounds overflow
- When the post-remapped coordinates exceed screen bounds, `getTouch()` was returning a "valid" status without updating the coordinates. This would result in spurious touch detection events at the screen boundaries.
- The fix ensures that the return value is set to "invalid" in this boundary condition.
2019-05-21 07:13:19 -07:00
Bodmer da2239f4c1
ESP8266 compiler compatibility update #361 2019-05-20 12:35:17 +01:00
Bodmer 9f17920115 Add ESP32 SD support for smooth font plus performance updates
Added SD card storage for smooth fonts with ESP32
ESP32 will use PSRAM (if available and enabled) to hold smooth font
metrics
Improve performance of ESP32 Sprite shared functions
Add basic ST7789 driver option
Latent bug fixes for pin mask
2019-04-15 12:23:16 +01:00