82 Commits
Author SHA1 Message Date
Melissa LeBlanc-Williams e4fcdba2b2 Merge pull request #237 from michaelkamprath/master
Added support in GFXcanvas* classes to access pixel values
2020-06-16 16:02:58 -07:00
nuxeh e806c84d3f Change boolean to bool (#303)
* Change boolean to bool

This avoids compiler warnings such as:

    In file included from /home/ed/git/dryer-arduino/ui/src/graphicstest.ino:18:
    .pio/libdeps/nucleo_f446re/Adafruit GFX Library_ID13/Adafruit_GFX.h:48:39: warning: 'boolean' is deprecated [-Wdeprecated-declarations]
       48 |   virtual void invertDisplay(boolean i);
          |                                       ^
    In file included from /home/ed/.platformio/packages/framework-arduinoststm32/cores/arduino/wiring.h:34,
                     from /home/ed/.platformio/packages/framework-arduinoststm32/cores/arduino/Arduino.h:32,
                     from /tmp/tmpvslwxjr7:1:
    /home/ed/.platformio/packages/framework-arduinoststm32/cores/arduino/wiring_constants.h:110:14: note: declared here

* Fix clang format issues unrelated to this PR

Addresses the following from CI:

    $ python3 ci/run-clang-format.py -e "ci/*" -e "bin/*" -r .
    --- ./Adafruit_GFX.h	(original)
    +++ ./Adafruit_GFX.h	(reformatted)
    @@ -240,8 +240,8 @@
       uint8_t textsize_x;   ///< Desired magnification in X-axis of text to print()
       uint8_t textsize_y;   ///< Desired magnification in Y-axis of text to print()
       uint8_t rotation;     ///< Display rotation (0 thru 3)
    -  bool wrap;         ///< If set, 'wrap' text at right edge of display
    -  bool _cp437;       ///< If set, use correct CP437 charset (default is off)
    +  bool wrap;            ///< If set, 'wrap' text at right edge of display
    +  bool _cp437;          ///< If set, use correct CP437 charset (default is off)
       GFXfont *gfxFont;     ///< Pointer to special font
     };

    --- ./Adafruit_GFX.cpp	(original)
    +++ ./Adafruit_GFX.cpp	(reformatted)
    @@ -1713,9 +1713,7 @@
        @returns  True if was pressed before, now is not.
     */
     /**************************************************************************/
    -bool Adafruit_GFX_Button::justReleased() {
    -  return (!currstate && laststate);
    -}
    +bool Adafruit_GFX_Button::justReleased() { return (!currstate && laststate); }

     // -------------------------------------------------------------------------
2020-06-15 11:20:29 -04:00
Melissa LeBlanc-Williams 8be8308f03 Revert "Optimized drawChar and drawCircleHelper" 2020-06-08 10:05:48 -07:00
Laurence Bank 632cf443a8 Reformatted with clang-format 2020-06-07 12:32:37 -04:00
Laurence Bank e1e51b09e1 pr cleanup 2020-06-07 10:11:36 -04:00
Laurence Bank 1b93789997 Optimized drwChar and drawCircleHelper 2020-06-06 18:51:57 -04:00
Michael Kamprath 6791eaca01 Re-running clang-format after the rebase 2020-06-05 11:00:20 -07:00
Michael Kamprath c53e9d24aa added support in GFXcanvas* classes to access pixel values
Alsp added and example for GFXcanvas that demonstrates the impact of rotation
on pixel layout and also demonstrates getting a pixel based on raw
physical coordinates.
2020-06-05 10:52:32 -07:00
lady ada d2b4b25559 manual implementation of https://github.com/adafruit/Adafruit-GFX-Library/pull/282 2020-05-17 12:35:25 -04:00
Limor "Ladyada" Fried 6abf693056 Actionsci2 (#264)
add library dependancy
remove travis CI
update badge
enable Actions
2019-12-27 17:10:08 -05:00
Melissa LeBlanc-Williams 4a161f1e00 Merge branch 'master' of https://github.com/adafruit/Adafruit-GFX-Library 2019-06-12 14:00:37 -07:00
Melissa LeBlanc-Williams 60e0e6335f Revert "Revert "Text magnification factor can be defined separately for X and for Y axis"" 2019-06-12 13:53:17 -07:00
Melissa LeBlanc-Williams 988f73af04 Revert "Text magnification factor can be defined separately for X and for Y axis" 2019-06-12 13:47:08 -07:00
jonnieZG 098fa70aae Fixed @param argument documentation 2019-06-12 22:11:21 +02:00
jonnieZG 022e8920cc Text magnification factor can be defined separately for X and for Y axis level. It allows you to print "tall" or "wide" text. 2019-06-12 20:31:45 +02:00
Oleksandr Masliuchenko 7c26ed40f5 Fix indentation (tab vs spaces) 2019-06-07 09:21:25 +03:00
Oleksandr Masliuchenko 50c1a22d20 Re-apply warning fix patch 2019-06-07 09:09:30 +03:00
Phillip Burgess b0dc94def7 Inline some of the trivial functions, add byteSwap() for GFXcanvas16 2019-05-29 20:33:31 -07:00
Calvin Hass 37ac3a5b52 Fix overflow in fillTriangle()
Addresses integer overflow fix identified by @prenticedavid in https://github.com/adafruit/Adafruit-GFX-Library/issues/218
2019-05-09 08:26:37 -07:00
Marc MERLIN 85023ccbaf Fixed Height typo (#214) 2019-04-29 13:24:18 -04:00
Phillip Burgess d81e3351f3 Fix some ESP8266 batshittery 2019-03-01 13:38:18 -08:00
Phillip Burgess 03cf2d917e Round rects; limit radius to 1/2 minor axis 2018-11-26 13:41:26 -08:00
Phillip Burgess 0521944f9f Fix fillCircleHelper for SSD1306 INVERT mode
Function would previously draw certain line segments repeatedly; minor performance drain on most displays, but especially problematic for SSD1306's INVERT drawing mode.
2018-11-08 15:01:27 -08:00
Limor "Ladyada" Fried f379d7070c Merge pull request #130 from vortigont/dev
Added String overload to getTextBounds() #90
2018-08-10 08:37:32 -07:00
Ville Karaila 675c972170 Added a cast to int_16 since height and width are uint_16s.
Note: Consider harmonizing types since uints might spill if someone
invents a 64k wide or high oled.. Jk. Changing h and w might be nice
tho, but keeping changes at minimum here.
2018-08-08 16:53:58 -07:00
Emil Muratov 15344e4ff9 Add doxygen for getTextBounds()
Signed-off-by: Emil Muratov <gpm@hotplug.ru>
2018-08-09 00:06:59 +03:00
Emil Muratov 05df41d963 Added String overload to getTextBounds() #90 2018-08-06 17:25:57 +03:00
ladyada 5614790a99 *falls over* 2018-07-14 15:21:57 -04:00
ladyada df54898306 more doxy, add a travis 2018-07-14 14:24:10 -04:00
ladyada ed59d3ea4a more doxy 2018-07-14 13:05:06 -04:00
Phillip Burgess 07f8f65e40 Back off on the PROGMEM declarations; const is sufficient. 2017-05-09 15:35:44 -07:00
Phillip Burgess 7589ecaf0f Extra-persnickety declarations in PROGMEM bitmap functions 2017-05-06 12:06:51 -07:00
Phillip Burgess d0e78f9db1 Fixed text wrap & bounds issues, changed drawRGBBitmap PROGMEM behavior + added masking 2017-05-05 19:57:52 -07:00
Phillip Burgess 868d3ed67e Add 8-bit canvas type, because reasons. Also some 1- and 16-bit canvas cleanup. 2017-05-04 22:06:09 -07:00
Paint Your Dragon 4b1a8a6850 Merge pull request #39 from marcmerlin/drawrgb
Added support for multicolor pixmaps in drawRGBBitmap.
2017-05-04 21:34:13 -07:00
Marc MERLIN aad430de1b Allow for drawing bitmaps in RAM (not in progmem). 2017-04-06 12:08:10 -07:00
Phillip Burgess cb95e0307b drawLine(): sort inputs on horizontal/vertical lines
C'mon guys, this is Graphics 101 stuff
2017-04-05 09:03:34 -07:00
ladyada 44568a85f2 Merge branch 'master' of github.com:adafruit/Adafruit-GFX-Library
Conflicts:
	Adafruit_GFX.cpp
2017-03-17 20:44:20 -04:00
Phillip Burgess b8f2200766 Handle larger button dimensions, add initButtonUL() for buttons w/upper-left coord 2017-03-07 10:24:06 -08:00
me-no-dev 4290f0b161 Implement transaction based drawing
With using transactions to draw, we save huge amount of time in pin
changing and SPI setup. This new model, together with the updated
ILI9341 lib give a much better performance.
2017-02-23 03:11:09 +02:00
Paint Your Dragon 2fced4b700 Merge pull request #71 from markwal/lastlinewidth
getTextBounds should consider the last line width
2016-08-23 15:16:40 -07:00
Phillip Burgess c349ad5e4f Improved(?) 32-bit CPU compatibility for fonts 2016-02-22 13:20:35 -08:00
Phillip Burgess f5ec45e42b adagfxswap() renamed and localized to .cpp file to avoid collisions 2016-01-26 10:37:56 -08:00
Mark Walker 39c2bb8173 getTextBounds counts the last line width too
In the default 5x7 font handling, the last line isn't considered when
determining the longest line.  Also, for the same reason, when there is
only one line, getTextBounds returns 65535 as the width.
2016-01-04 16:50:49 -08:00
Mark Walker 0f2f32586b ESP8266 has 32-bit pgm pointers 2016-01-02 01:22:44 -08:00
Phillip Burgess a6a9359352 Further AVR bitmask tweaks, sorry about that 2015-12-28 13:52:26 -08:00
Phillip Burgess 9cb1ec4401 Bitmap fixes, initial canvas support 2015-12-28 10:58:40 -08:00
Phillip Burgess fb9e169398 Manual merge of TheNotary's RAM-based bitmap functions. 2015-12-27 21:29:50 -08:00
Phillip Burgess f2e454dcf4 Added pgm_read_word() def for non-AVR chips 2015-12-24 20:20:11 -08:00
Phillip Burgess 80b1bc48cb Fonts FONTS fonts! 1.1 release 2015-12-22 12:02:47 -08:00