Commit Graph

160 Commits

Author SHA1 Message Date
Bodmer 13d217dc89 Add viewport feature
2 new example sketches added for viewport demonstration
2020-10-06 00:51:41 +01:00
Bodmer d7fdcc0991 Fix #740 and #704
#740: To avoid ambiguity the pushSprite for writing a sprite to another sprite has been renamed pushToSprite

#704: Change to 18 bit colurs for SSD1963 with SPI interface

Remove outdated TFT_SPIFFS_Jpeg example
2020-09-07 22:04:42 +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
kamorris a7be0c0ebe delete extraneous ino file 2020-06-18 20:29:10 -07:00
Bodmer fb86ae4d1b Update Read_User_Setup add #648
Read_User_Setup now includes backlight settings
2020-06-06 14:55:02 +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
kamorris 0db6eed9e0 add 4bit image support, tools and examples 2020-05-25 15:29:41 -07:00
Bodmer fc8d912f52 Update Read_User_Setup.ino 2020-05-05 21:40:24 +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 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 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 b3db931dc5
Move label 2020-03-20 00:34:26 +00:00
Bodmer 7f7cc24b00 Add new animated dial example
See Sprite "Animated_dial" example.
2020-03-20 00:30:12 +00:00
Bodmer ef21c44a28 Add more smooth font examples
The extra examples use smooth fonts stored in arrays and thus can run on STM32 processors which do not support SPIFFS.
2020-02-18 01:41:34 +00:00
Bodmer eac96793a1 Update ReadMe
Delete data folders.
Ass missing headers to Font_Demo_1_Array example.
2020-02-15 00:02:01 +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
Just Call Me Koko b734b81e6b Fix center aligned button text 2020-02-05 22:21:02 -05:00
justcallmekoko 2b1147c6e8 Add setLabelDatum 2020-02-05 14:13:58 -05: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 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 5d280f998c Fix #346 2019-11-02 14:18:33 +00: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 9a84fb156b
Fix #424 2019-10-03 23:53:43 +01:00
Bodmer 0769e49718
Update Floyd_Steinberg_BMP.ino
Correct compile error.
2019-09-28 21:54:42 +01:00
Bodmer da349a5fbd Minor changes 2019-06-03 23:31:04 +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
Bodmer 1edfe6c680 Fic #311
Pixel function used wrong width and height for bounds check.
Remove String variable in smooth font code (not used)
Correct ESP8266UncannyEyes example for new setAddrWindow parameters
2019-02-20 00:45:02 +00:00
Bodmer 13f0589aa6
Adapt for new setAddrWindow parameters 2019-02-18 01:21:26 +00:00
Bodmer e17ba463c9 Add UTF-8 on/off control via new setAttribute function
No change to legacy sketches meeded, UTF-8 decoding is on by default.
Add colour test example.
2019-02-17 22:35:49 +00:00
Bodmer 26d7e4038a Fix touch screen handler
The touch screen handler was broken for the ESP8266 only. The library
uses SPI write only configuration for ESP8266 so the SPI buffer can be
recycled and it was left in write only mode. The library now switches
back to read & write mode at the end of a transaction.
2019-02-14 00:32:16 +00:00
Bodmer e25da37fc5 Correct diagnostic example 2019-02-11 21:09:38 +00:00
Bodmer 1e1e888fa0 Support extended font formats
Adafruit_GFX font support extended to Unidode Basic Multilingual Plane
Print stream deocdes UTF-8
Smooth font ascent and descent (affects line spacing) changed to rely on
metrics provided by Processing IDE (issue #303)
Bug fix for font rendering with no background on RLE native fonts
2019-02-10 21:36:40 +00:00
Bodmer 0b8e957203 Remove screen server code 2019-02-08 18:50:03 +00:00
Bodmer 61dfb2b4ac Extended character set suport for Adafruit_GFX format fonts
Supports Adafruit_GFX compatible font format with characters in the range 32-255.

Note that the font rendering functions expect UTF-8 encoded characters/strings.
2019-02-08 18:25:55 +00:00
Bodmer 33d9313113
Update for ESP8266
ESP32 printf() can handle String type but ESP8266 cannot.
2019-01-31 01:17:19 +00:00
Bodmer caef4519f3 Improve bounds checking update CS management
Add bounds checking to graphics functions
Rationalise variable types and style used to minimse type casting needs
(this change ended up being a more extensive refactoring than
anticipated - but once started...)
Add version reporting to diagnostic sketch
Boost PDQ graphicstest performance
2019-01-25 14:25:40 +00:00
Bodmer 0460ab64d2 Delete weather-station example
Because Weather Underground will no longer support free API's
2019-01-22 19:09:18 +00:00
Bodmer 054a824eb8 Add ESP32 VSPI or HSPI port option + others
If the VSPI port is in use and pins are not accessible (e.g. TTGO
T-Beam)
then add or uncomment the following line in the setup header file:
//#define USE_HSPI_PORT

Minor performance tweaks for ESP32 to minimise the occurence of the slow
transaction overhead.

setAddrWindow now takes xstart, ystart, width and height as inputs

Multi-sample raw touch x and y for noisy displays

Example update for setAddrWindow change compatibility
2019-01-22 18:41:31 +00:00
Bodmer 05359a4dff Misc updates
Speed up Sprite rotation on an ESP32
Update utf8 serial decoder to handle illegal format strings
Remove need for D0_USED_FOR_xx (issue #271)
Clean up setup files
Correct various comment typos
2019-01-06 17:45:06 +00:00
Bodmer 96228cbf44 Add Sprite rotation and examples
Sprites can be rendered rotated with defined pivot points, 3 new
examples have been added "Rotated_Sprite_1/2/3".
The FLASH bitmap example has been moved to the Generic examples folder.
Boundary checks have been added to pushImage()
A new scrolling and wrapping in a Sprite example has been added.
2019-01-06 01:14:10 +00:00
Bodmer 046e48f8c3 Delete legacy example 2018-11-25 18:08:29 +00:00
Bodmer a0e2bc97d6
Comment typo 2018-11-24 23:45:31 +00:00
Bodmer b0d56ce394 Add ability to scroll 1bpp Sprites
New example added: Sprite_scroll_1bit
2018-11-24 23:30:40 +00:00
Bodmer 1cf2305e4d Add capability to read TFT SDA bi-directional pin
Tested on an ESP32 with ST7789V display
SDA read is very slow on an ESP8266 (to be investigated)
Added new setup #define TFT_SDA_READ
Add new ESP32 and ESP8266 compatible in example/Generic folder to test
capture of TFT screen
2018-11-23 03:09:07 +00:00
Bodmer b93a40a54f
Correct datum marker for different screen sizes
datum marker was not in correct position on screens that are not 320x240 pixels
2018-10-23 14:20:45 +01:00
Bodmer d12a68a49d Add checks in examples for missing font files 2018-10-21 21:57:30 +01:00
Bodmer 1a0b37097a Add new anti-aliased (smooth) font examples + bug fixes
Four new examples have been added to show different methods of rendering
the anta-aliased fonts.  A few minor bugs have been corrected associated
with the font rendering. drawNumber and drawFloat handle fixed width
mono fonts with no digit movement.
2018-10-21 17:53:27 +01:00
Bodmer a38efa5330 Add missing image files 2018-10-10 22:52:21 +01:00
per1234 30c01c94ef
Rename file to match #include directive
Mismatch of case between filename and #include directive causes compilation to fail in case sensitive operating systems such as Linux. Rather than correct the filename in the #include directive I have chosen to change the filename to make it consistent with the other file of the similar name. A search indicates that this is also consistent with the official spelling of the font.
2018-06-02 05:41:08 -07:00
Bodmer 4a52f5e685 Add ability to set ST7735 tab color from sketch
Use line is form:
tft.init(1);
or:
tft.init(INITR_REDTAB);
// Enumerated the configurations in library are:
#define INITR_GREENTAB
0x0
#define INITR_REDTAB    0x1
#define INITR_BLACKTAB  0x2
#define
INITR_GREENTAB2 0x3 // Use if you get random pixels on two edges of
green tab display
#define INITR_GREENTAB3 0x4 // Use if you get random
pixels on edge(s) of 128x128 screen
#define INITR_GREENTAB128 0x5 // Use
if you only get part of 128x128 screen in rotation 0 & 1
#define INITB
0xB
2018-05-25 22:48:22 +01:00
Bodmer 96916c2bce Add SPIFFS BMP (bitmap) image file rendering example 2018-05-01 16:44:41 +01:00
Bodmer 151dd60913 Add ESP32 SDcard jpeg file rendering sketch 2018-04-23 21:02:50 +01:00
Bodmer 235887d860 Update weather station example
Corrected jpeg render fn to handle any width image
Minor tweaks
Remove version number from sketch name, put in settings.h
2018-04-23 20:05:50 +01:00
Bodmer 54b3f0f63d Add drawXBitmap() function and example
Example is in Generic folder, draw the Espressif logo on the screen.
2018-04-23 17:16:18 +01:00
Bodmer f56184e9cd Add diagnostic sketches
Do not load button class is touch screen chip select not defined
2018-04-11 01:03:26 +01:00
Bodmer f2c92fb75f Free the memory in example! 2018-04-03 01:09:10 +01:00
Bodmer ada678d76e Added Waveshare ePaper support
Also added ability to push 1bpp bitmaps to a Sprite to support rendering
images on an EPaper screen.

Floyd-Steinberg dithering and basic graphics example added as first
ePaper demo.
2018-04-02 02:53:42 +01:00
Bodmer d9d5625e48 Add 1 bpp examples 2018-03-28 01:59:06 +01:00
Bodmer 0f22d124f6 Add note rthat Read ID sketch does not work with parallel displays 2018-03-22 22:33:01 +00:00
Bodmer bbacd3a8a3 Fix issue in #110
Array name close[] clashes with a ESP32 function name.
Renamed array to closeX[]
2018-03-22 22:27:09 +00:00
Bodmer 8752236ac2 Add smooth (antialiased) fonts 2018-02-24 19:02:20 +00:00
Bodmer 5ed1bb6777
Allow larger images 2017-12-16 01:38:09 +00:00
Bodmer 0dacb156ed
Allow larger images 2017-12-16 01:37:22 +00:00
Bodmer ca13757c9b
Allow larger images
width or height over 127 pixels got converted to a negative number!
2017-12-16 01:36:16 +00:00
Bodmer 93ba6e3716 Add scrolling inside a sprite
Added example "Sprite_scroll"
Tidy up virtual function list
Add PROGMEM bitmap image functions
2017-12-10 23:04:31 +00:00
Bodmer d2104f6d85 Add ability to plot Sprites with a "transparent" colour
Can now specify a colour that will not be plotted so some part of the
Sprite are "transparent" and the TFT backforund shows through. New
example added for demonstration.
2017-12-03 02:29:39 +00:00
Bodmer 312b7c1128 Tidy up 8 bit sprite code and fix gugs
Minor tweaks and speed improvements
2017-11-24 14:12:29 +00:00
Bodmer 3b5e673603 Version update, minor tweaks and typos 2017-11-22 00:53:09 +00:00
Bodmer 3e3d638bba Add support for 8 bit color sprites (needs less RAM)
Added setColorDepth(d) where "d" is 8 or 16.
Default is 16 bit if not specified.
2017-11-21 22:57:11 +00:00
Bodmer 1b5ffe4189
Fn changed 2017-11-15 22:41:17 +00:00
Bodmer fbb07be73b
Stop pointer error 2017-11-15 22:38:57 +00:00
Bodmer 2c6f1c70e4
typo 2017-11-15 21:55:06 +00:00
Bodmer 943c18facf Add sprite class
Sprites (images) can now be created in RAM, written to with text and
graphics and rendered to screen quickly, this makes it easier to get
flicker frre screen updates.
ESP8266 can typically create up to a 160x128 sprite, and ESP32 about
200x200 pixels. 16 bit colour only at the moment, may soon implement 8
bit colour to reduce RAM.
2017-11-15 20:26:22 +00:00
Bodmer 62c02b67f7
Replace accidentally deleted line! 2017-11-15 10:19:45 +00:00
Bodmer 2e91bcd137
Issue #53 fix
In case of a non- supported BMP, the _tft->setRotation() should not be executed.
2017-11-13 21:15:28 +00:00
Bodmer fbdc65a3c7 Whoops, another typo - who put S and W keys next to each other ;-) 2017-10-25 02:08:52 +01:00
Bodmer 5d497f751b Correct typo 2017-10-25 02:05:59 +01:00
Bodmer acd3fe7b85 Add simple touch calibrate and test sketch
This one does not need SPIFFS, cal data is embedded in sketch by user.
2017-10-25 01:57:42 +01:00
Bodmer e4ea506b65 Update touch, add Button class
Touch reliability improved by using pressure and double sampling. Added
Adafruit compatible Button class. Added touchscreen on/off and keypad
examples.
2017-10-23 01:59:37 +01:00
Bodmer 167dcd5373 Revert 160 x 128 jpeg code 2017-10-17 00:11:13 +01:00
Bodmer 0bcf7eaa6b Correct jpeg decoder image edge rendering
Revert setup file and add setup 10
2017-10-17 00:07:49 +01:00
Bodmer afe310f00f Merge pull request #43 from maxpautsch/master
Add XPT2046 touch controller support
2017-10-16 23:00:12 +01:00
Bodmer 80b5d91ba4 Fix right edge jpeg image corruption
Jpeg images with non integer number of MCU pixels showed corrupted right
edge. Fix is to concatenate pixels into a contiguous block. Examples
corrected.
2017-10-11 00:59:14 +01:00
Max 548fcca258 now calibration works with all orientations. 2017-10-01 21:34:11 +02:00
Max b6d234af70 should add ESP32 support. do not have hardware to test. 2017-10-01 00:58:33 +02:00
Max ca54325fbc Add XPT2046 touch controller
supports esp8266 + RPi displays
OO
2017-10-01 00:26:33 +02:00
Bodmer 15dcc77909 Add jpeg examples for 160x128 display 2017-07-15 23:39:57 +01:00
Bodmer 399411312c Fix date over-write bug
Also text over-write during bootup
2017-04-27 23:56:38 +01:00
Bodmer 40d35b1892 Examples menu now based on resolution
Reference to particular drivers in examples have been removed as
multiple display drivers are now supported.
Tabs replaced by spaces in header file by file editor.
RPi TFT with write strobe SPI clock rate dropped to 20MHz (display
cannot cope with new high rate siWriteBlock() function)
2017-04-24 22:35:11 +01:00
Bodmer 086e52804f Add Jpeg rendering example 2017-03-27 19:40:17 +01:00
Bodmer 4f8029b096 Added support for RPi TFT
16 bit serial based ILI9486 supported
2017-03-24 23:23:35 +00:00
Bodmer 4d0488a906 Update screenshot client and server sketches
Server can now provide a filepath/name,  define saved image file type
and specify filename extension method.  Max number of images saved by
client per session limited to 1000. A pause/run button has been added.
2017-03-13 02:31:59 +00:00
Bodmer d89b72f93c Update custom font example 2017-03-12 01:20:24 +00:00
Bodmer 189a390f34 Correct red blue colour swap 2017-03-12 01:10:29 +00:00