diff --git a/.codespellrc b/.codespellrc index 101edae..a41b93c 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,7 +1,7 @@ # See: https://github.com/codespell-project/codespell#using-a-config-file [codespell] # In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here: -ignore-words-list = , +ignore-words-list = cleary,mis check-filenames = check-hidden = skip = ./.git diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml index 3e0d26c..e818685 100644 --- a/.github/workflows/check-arduino.yml +++ b/.github/workflows/check-arduino.yml @@ -16,10 +16,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: compliance: specification library-manager: update diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 326b00a..d80f79f 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -36,16 +36,19 @@ jobs: - fqbn: arduino:samd:arduino_zero_edbg platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-arduino_zero_edbg - fqbn: arduino:samd:mkrzero platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-mkrzero - fqbn: arduino:samd:nano_33_iot platforms: | - name: arduino:samd + artifact-name-suffix: arduino-samd-nano_33_iot steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile examples uses: arduino/compile-sketches@v1 @@ -64,8 +67,8 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save sketches report as workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: if-no-files-found: error + name: sketches-report-${{ matrix.board.artifact-name-suffix }} path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index 652be5d..39e2a0a 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -20,5 +20,5 @@ jobs: - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@v1 with: - # The name of the workflow artifact created by the sketch compilation workflow - sketches-reports-source: sketches-reports + # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow + sketches-reports-source: ^sketches-report-.+ diff --git a/.github/workflows/spell-check.yml b/.github/workflows/spell-check.yml index 3f6b03f..ef7d894 100644 --- a/.github/workflows/spell-check.yml +++ b/.github/workflows/spell-check.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Spell check uses: codespell-project/actions-codespell@master diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 94938f3..53a9f54 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download JSON schema for labels configuration file id: download-schema @@ -70,7 +70,7 @@ jobs: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} - name: Pass configuration files to next job via workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | *.yaml @@ -105,16 +105,16 @@ jobs: echo "::set-output name=flag::--dry-run" - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download configuration files artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} path: ${{ env.CONFIGURATIONS_FOLDER }} - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + uses: geekyeggo/delete-artifact@v5 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..485dee6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a612ad9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,373 @@ +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/README.adoc b/README.adoc deleted file mode 100644 index a77a80e..0000000 --- a/README.adoc +++ /dev/null @@ -1,30 +0,0 @@ -:repository-owner: arduino-libraries -:repository-name: ArduinoGraphics - -= {repository-name} Library for Arduino = - -image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml/badge.svg["Check Arduino status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml"] -image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml/badge.svg["Compile Examples status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml"] -image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml"] - -Core graphics library for Arduino. Based on the Processing API. - -For more information about this library please visit us at https://www.arduino.cc/en/Reference/ArduinoGraphics - -== License == - -Copyright (c) 2019 Arduino SA. All rights reserved. - -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. - -This library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/README.md b/README.md new file mode 100644 index 0000000..b4f164f --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# ArduinoGraphics Library for Arduino + +![Check Arduino status](https://github.com/arduino-libraries/ArduinoGraphics/actions/workflows/check-arduino.yml/badge.svg) +![Compile Examples status](https://github.com/arduino-libraries/ArduinoGraphics/actions/workflows/compile-examples.yml/badge.svg) +![Spell Check status](https://github.com/arduino-libraries/ArduinoGraphics/actions/workflows/spell-check.yml/badge.svg) + +Core graphics library for Arduino. Based on the Processing API. + +📖 For more information about this library please read the documentation [here](./docs/) or visit us at [https://www.arduino.cc/en/Reference/ArduinoGraphics](https://www.arduino.cc/en/Reference/ArduinoGraphics) diff --git a/docs/api.md b/docs/api.md index a870920..004b2b6 100644 --- a/docs/api.md +++ b/docs/api.md @@ -6,7 +6,6 @@ #### Description - Initializes the graphics device. #### Syntax @@ -15,7 +14,6 @@ Initializes the graphics device. YourScreen.begin() ``` - #### Parameters None @@ -27,14 +25,12 @@ None #### Example ``` -if (!YourScreen.begin() { - Serial.println(“Failed to initialize the display!”); +if (!YourScreen.begin()) { + Serial.println("Failed to initialize the display!"); while (1); } ``` - - ### `end()` #### Description @@ -45,16 +41,12 @@ Stops the graphics device. ``` YourScreen.end() - ``` - #### Parameters - None - #### Returns Nothing @@ -65,26 +57,20 @@ Nothing YourScreen.end(); ``` - - ### `width()` #### Description - Returns the pixel width of the graphics device. #### Syntax ``` YourScreen.width() - ``` - #### Parameters - None #### Returns @@ -97,25 +83,20 @@ Returns the pixel width of the graphics device. int w = YourScreen.width(); ``` - ### `height()` #### Description - Returns the pixel height of the graphics device. #### Syntax ``` YourScreen.height() - ``` - #### Parameters - None #### Returns @@ -128,62 +109,50 @@ Returns the pixel height of the graphics device. int h = YourScreen.height(); ``` - ### `beginDraw()` #### Description - Begins a drawing operation. #### Syntax ``` YourScreen.beginDraw() - ``` - #### Parameters - None - #### Returns Nothing #### Example - +``` YourScreen.beginDraw(); YourScreen.set(0, 0, 255, 0, 0); YourScreen.endDraw(); - - +``` ### `endDraw()` #### Description - Ends a drawing operation, any drawing operations after beginDraw() is called will be displayed to the screen. #### Syntax ``` YourScreen.endDraw() - ``` - #### Parameters - None - #### Returns Nothing @@ -196,12 +165,10 @@ YourScreen.set(0, 0, 255, 0, 0); YourScreen.endDraw(); ``` - ### `background()` #### Description - Set the background color of drawing operations. Used when calling clear() or drawing text. #### Syntax @@ -209,13 +176,10 @@ Set the background color of drawing operations. Used when calling clear() or dra ``` YourScreen.background(r, g, b) YourScreen.background(color) - ``` - #### Parameters - - r: red color value (0 - 255) - g: green color value (0 - 255) - b: blue color value (0 - 255) @@ -234,27 +198,23 @@ YourScreen.clear(); YourScreen.endDraw(); ``` - ### `clear()` #### Description - -Set clear the screen contents, uses the background colour set in background(). +Clear the screen contents or a specific pixel, uses the background colour set in background(). #### Syntax ``` YourScreen.clear() - +YourScreen.clear(x, y) ``` - #### Parameters - -None - +- x: x position of the pixel to clear +- y: y position of the pixel to clear #### Returns @@ -269,13 +229,10 @@ YourScreen.clear(); YourScreen.endDraw(); ``` - - ### `fill()` #### Description - Set the fill color of drawing operations. #### Syntax @@ -283,13 +240,10 @@ Set the fill color of drawing operations. ``` YourScreen.fill(r, g, b) YourScreen.fill(color) - ``` - #### Parameters - - r: red color value (0 - 255) - g: green color value (0 - 255) - b: blue color value (0 - 255) @@ -310,28 +264,22 @@ YourScreen.rect(0, 0, YourScreen.width(), YourScreen.height()); YourScreen.endDraw(); ``` - ### `noFill()` #### Description - Clears the fill color of drawing operations. #### Syntax ``` YourScreen.noFill() - ``` - #### Parameters - None - #### Returns Nothing @@ -347,12 +295,10 @@ YourScreen.rect(0, 0, YourScreen.width(), YourScreen.height()); YourScreen.endDraw(); ``` - ### `stroke()` #### Description - Set the stroke color of drawing operations. #### Syntax @@ -360,13 +306,10 @@ Set the stroke color of drawing operations. ``` YourScreen.stroke(r, g, b) YourScreen.stroke(color) - ``` - #### Parameters - - r: red color value (0 - 255) - g: green color value (0 - 255) - b: blue color value (0 - 255) @@ -387,29 +330,22 @@ YourScreen.rect(0, 0, YourScreen.width(), YourScreen.height()); YourScreen.endDraw(); ``` - - ### `noStroke()` #### Description - Clears the stroke color of drawing operations. #### Syntax ``` YourScreen.noStroke() - ``` - #### Parameters - None - #### Returns Nothing @@ -425,25 +361,20 @@ YourScreen.rect(0, 0, YourScreen.width(), YourScreen.height()); YourScreen.endDraw(); ``` - ### `line()` #### Description - Stroke a line, uses the stroke color set in stroke(). #### Syntax ``` YourScreen.line(x1, y1, x2, y2) - ``` - #### Parameters - - x1: x position of the starting point of the line - y1: y position of the starting point of the line - x2: x position of the end point of the line @@ -463,25 +394,20 @@ YourScreen.line(0, 0, YourScreen.width() - 1, YourScreen.height() - 1); YourScreen.endDraw(); ``` - ### `point()` #### Description - Stroke a point, uses the stroke color set in stroke(). #### Syntax ``` YourScreen.point(x, y) - ``` - #### Parameters - x: x position of the point y: y position of the point @@ -499,25 +425,20 @@ YourScreen.point(1, 1); YourScreen.endDraw(); ``` - ### `rect()` #### Description - Stroke and fill a rectangle, uses the stroke color set in stroke() and the fill color set in fill(). #### Syntax ``` YourScreen.rect(x, y, width, height) - ``` - #### Parameters - - x: x position of the rectangle - y: y position of the rectangle - width: width of the rectangle @@ -538,25 +459,20 @@ YourScreen.rect(0, 0, YourScreen.width(), YourScreen.height()); YourScreen.endDraw(); ``` - ### `circle()` #### Description - Stroke and fill a circle, uses the stroke color set in stroke() and the fill color set in fill(). #### Syntax ``` YourScreen.circle(x, y, diameter) - ``` - #### Parameters - - x: x center position of the circle - y: y center position of the circle - diameter: diameter of the circle @@ -576,25 +492,20 @@ YourScreen.circle(YourScreen.width()/2, YourScreen.height()/2, YourScreen.height YourScreen.endDraw(); ``` - ### `ellipse()` #### Description - Stroke and fill an ellipse, uses the stroke color set in stroke() and the fill color set in fill(). #### Syntax ``` YourScreen.ellipse(x, y, width, height) - ``` - #### Parameters - - x: x center position of the ellipse - y: y center position of the ellipse - width: width of the ellipse @@ -615,12 +526,10 @@ YourScreen.ellipse(YourScreen.width()/2, YourScreen.height()/2, YourScreen.width YourScreen.endDraw(); ``` - ### `text()` #### Description - Draw some text, uses the stroke color set in stroke() and the background color set in background(). #### Syntax @@ -628,13 +537,10 @@ Draw some text, uses the stroke color set in stroke() and the background color s ``` YourScreen.text(string) YourScreen.text(string, x, y) - ``` - #### Parameters - - string: string to draw - x: x position for the start of the text - y: y position for the start of the text @@ -653,28 +559,22 @@ YourScreen.text("abc", 0, 1); YourScreen.endDraw(); ``` - ### `textFont()` #### Description - -Sets the font uses for text. The library current has the Font_4x6 and Font_5x7 built in. +Sets the font used for text. The library current has the Font_4x6 and Font_5x7 built in. #### Syntax ``` YourScreen.textFont(font) - ``` - #### Parameters - font: font to set - #### Returns Nothing @@ -690,12 +590,10 @@ YourScreen.text("abc", 0, 1); YourScreen.endDraw(); ``` - ### `textFontWidth()` #### Description - Returns the width, in pixels, of the current font. #### Syntax @@ -705,13 +603,10 @@ YourScreen.textFontWidth() ``` - #### Parameters - None - #### Returns Nothing @@ -722,28 +617,22 @@ Nothing int w = YourScreen.textFontWidth(); ``` - ### `textFontHeight()` #### Description - Returns the height, in pixels, of the current font. #### Syntax ``` YourScreen.textFontHeight() - ``` - #### Parameters - None - #### Returns Nothing @@ -754,12 +643,45 @@ Nothing int h = YourScreen.textFontHeight(); ``` +### `textSize()` + +#### Description + +Set a text scale factor + +#### Syntax + +``` +YourScreen.textSize(scale) +YourScreen.textSize(scaleX, scaleY) +``` + +#### Parameters + +scale: scale factor used for both x and y +scaleX: x scale factor +scaleY: y scale factor + +#### Returns + +Nothing + +#### Example + +``` +YourScreen.beginDraw(); +YourScreen.clear(); +YourScreen.stroke(255, 255, 255); +YourScreen.textFont(Font_5x7); +YourScreen.textSize(5); +YourScreen.text("abc", 0, 1); +YourScreen.endDraw(); +``` ### `set()` #### Description - Set a pixel’s color value. #### Syntax @@ -767,13 +689,10 @@ Set a pixel’s color value. ``` YourScreen.set(x, y, r, g, b) YourScreen.set(x, y, color) - ``` - #### Parameters - x: x position of the pixel y: y position of the pixel r: red color value (0 - 255) @@ -793,12 +712,10 @@ YourScreen.point(1, 1, 0, 255, 0); YourScreen.endDraw(); ``` - ### `beginText()` #### Description - Start the process of displaying and optionally scrolling text. The Print interface can be used to set the text. #### Syntax @@ -807,13 +724,10 @@ Start the process of displaying and optionally scrolling text. The Print interfa YourScreen.beginText() YourScreen.beginText(x, y, r, g, b) YourScreen.beginText(x, y, color) - ``` - #### Parameters - x: x position of the text y: y position of the text r: red color value (0 - 255) @@ -833,12 +747,10 @@ YourScreen.print("Hi"); YourScreen.endText(); ``` - ### `endText()` #### Description - End the process of displaying and optionally scrolling text. #### Syntax @@ -846,13 +758,10 @@ End the process of displaying and optionally scrolling text. ``` YourScreen.endText() YourScreen.endText(scrollDirection) - ``` - #### Parameters - scrollDirection: (optional) the direction to scroll, defaults to NO_SCROLL if not provided. Valid options are NO_SCROLL, SCROLL_LEFT, SCROLL_RIGHT, SCROLL_UP, SCROLL_DOWN #### Returns @@ -867,28 +776,22 @@ YourScreen.print("Hi"); YourScreen.endText(); ``` - ### `textScrollSpeed()` #### Description - Sets the text scrolling speed, the speed controls the delay in milliseconds between scrolling each pixel. #### Syntax ``` YourScreen.textScrollSpeed(speed) - ``` - #### Parameters - speed: scroll speed - #### Returns Nothing @@ -901,4 +804,3 @@ YourScreen.textScrollSpeed(500); YourScreen.print("Hello There!"); YourScreen.endText(true); ``` - diff --git a/docs/readme.md b/docs/readme.md index 92ff8db..0dd9764 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -1,6 +1,6 @@ # Arduino Graphics Library -This is a library that allows you to draw and write on screens with graphical primitives; it requires a specific hardware interfacce library to drive the screen you are using, therefore every screen type should have its own hardware specific library. +This is a library that allows you to draw and write on screens with graphical primitives; it requires a specific hardware interface library to drive the screen you are using, therefore every screen type should have its own hardware specific library. To use this library @@ -10,4 +10,11 @@ To use this library To let you easily understand the usage of the graphics primitives, we are using a dummy screen object named YourScreen that should be substituted with the real one, Eg. MATRIX, OLED, TFT and so on. Refer to the hardware interfacing library of your screen to get more details. -The style and syntax of this library is inspired by [Processing 3](https://processing.org/) and we believe that learning Processing is very helpful to develop complex applications that combine the versatility of Arduino driven hardware with the power of a pc based graphical interface. \ No newline at end of file +The style and syntax of this library is inspired by [Processing 3](https://processing.org/) and we believe that learning Processing is very helpful to develop complex applications that combine the versatility of Arduino driven hardware with the power of a pc based graphical interface. + +## How-to generate bitmaps from the fonts + +```bash +cd extras +./generate_font.py 5x7.bdf Font_5x7.c Font_5x7 +``` \ No newline at end of file diff --git a/examples/ASCIIDraw/ASCIIDraw.ino b/examples/ASCIIDraw/ASCIIDraw.ino index 398a40d..dfb6bb3 100644 --- a/examples/ASCIIDraw/ASCIIDraw.ino +++ b/examples/ASCIIDraw/ASCIIDraw.ino @@ -14,8 +14,9 @@ #include -const byte canvasWidth = 61; -const byte canvasHeight = 27; +const byte fontSize = 3; +const byte canvasWidth = fontSize * (5 * 7) + 26; +const byte canvasHeight = fontSize * 7 + 20; class ASCIIDrawClass : public ArduinoGraphics { public: @@ -85,6 +86,7 @@ void setup() { ASCIIDraw.stroke('@', 0, 0); const char text[] = "ARDUINO"; ASCIIDraw.textFont(Font_5x7); + ASCIIDraw.textSize(fontSize); const byte textWidth = strlen(text) * ASCIIDraw.textFontWidth(); const byte textHeight = ASCIIDraw.textFontHeight(); const byte textX = (canvasWidth - textWidth) / 2; diff --git a/extras/generate_font.py b/extras/generate_font.py index de786e5..48efb84 100755 --- a/extras/generate_font.py +++ b/extras/generate_font.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# This file is part of the MKRRGBMatrix library. +# This file is part of the ArduinoGraphics library. # Copyright (c) 2018 Arduino SA. All rights reserved. # # This library is free software; you can redistribute it and/or @@ -60,22 +60,27 @@ out = open(output, "w") -print >> out, "#include \"Font.h\"" -print >> out -print >> out, "const struct Font %s = {" % ( name ) -print >> out, " %d," % ( fontWidth ) -print >> out, " %d," % ( fontHeight ) -print >> out, " (const uint8_t*[]){" +out.write("#include \"Font.h\"\n") +out.write("\n") +out.write("const struct Font %s = {" % ( name )) +out.write("\n") +out.write(" %d," % ( fontWidth )) +out.write("\n") +out.write(" %d," % ( fontHeight )) +out.write("\n") +out.write(" (const uint8_t*[]){\n") for c in range (0, 255): if None == fontCharacters[c]: - print >> out, " NULL," + out.write(" NULL,\n") else: - print >> out, " // %s" % (fontCharacterNames[c]) - print >> out, " (const uint8_t[]){" + out.write(" // %s" % (fontCharacterNames[c])) + out.write("\n") + out.write(" (const uint8_t[]){\n") for i in range(0, fontHeight): - print >> out, " 0b%s," % ('{0:08b}'.format(fontCharacters[c][i])) - print >> out, " }," -print >> out, " }" -print >> out, "};" + out.write(" 0b%s," % ('{0:08b}'.format(fontCharacters[c][i]))) + out.write("\n") + out.write(" },\n") +out.write(" }\n") +out.write("};\n") out.close() diff --git a/library.properties b/library.properties index 7933150..a6a1080 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ name=ArduinoGraphics -version=1.1.0 +version=1.1.4 author=Arduino maintainer=Arduino sentence=Core graphics library for Arduino. paragraph=Based on the Processing API. category=Display url=http://github.com/arduino-libraries/ArduinoGraphics -architectures=samd +architectures=samd,renesas_uno includes=ArduinoGraphics.h diff --git a/src/ArduinoGraphics.cpp b/src/ArduinoGraphics.cpp index 15fe1ad..2a62a3a 100644 --- a/src/ArduinoGraphics.cpp +++ b/src/ArduinoGraphics.cpp @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #include "ArduinoGraphics.h" @@ -26,7 +12,9 @@ ArduinoGraphics::ArduinoGraphics(int width, int height) : _width(width), _height(height), - _font(NULL) + _font(NULL), + _textSizeX(1), + _textSizeY(1) { } @@ -94,6 +82,11 @@ void ArduinoGraphics::clear() } } +void ArduinoGraphics::clear(int x, int y) +{ + set(x, y, _backgroundR, _backgroundB, _backgroundG); +} + void ArduinoGraphics::fill(uint8_t r, uint8_t g, uint8_t b) { _fill = true; @@ -238,10 +231,10 @@ void ArduinoGraphics::text(const char* str, int x, int y) } while (*str) { - int c = *str++; + uint8_t const c = (uint8_t)*str++; if (c == '\n') { - y += _font->height; + y += _font->height * _textSizeY; } else if (c == '\r') { x = 0; } else if (c == 0xc2 || c == 0xc3) { @@ -254,10 +247,10 @@ void ArduinoGraphics::text(const char* str, int x, int y) } if (b) { - bitmap(b, x, y, _font->width, _font->height); + bitmap(b, x, y, _font->width, _font->height, _textSizeX, _textSizeY); } - x += _font->width; + x += _font->width * _textSizeX; } } } @@ -269,38 +262,51 @@ void ArduinoGraphics::textFont(const Font& which) int ArduinoGraphics::textFontWidth() const { - return (_font ? _font->width : 0); + return (_font ? _font->width * _textSizeX : 0); } int ArduinoGraphics::textFontHeight() const { - return (_font ? _font->height : 0); + return (_font ? _font->height* _textSizeY : 0); } -void ArduinoGraphics::bitmap(const uint8_t* data, int x, int y, int width, int height) +void ArduinoGraphics::textSize(uint8_t sx, uint8_t sy) { - if (!_stroke) { + _textSizeX = (sx > 0)? sx : 1; + _textSizeY = (sy > 0)? sy : 1; +} + + +void ArduinoGraphics::bitmap(const uint8_t* data, int x, int y, int w, int h, uint8_t scale_x, uint8_t scale_y) { + if (!_stroke || !scale_x || !scale_y) { return; } - if ((data == NULL) || ((x + width) < 0) || ((y + height) < 0) || (x > _width) || (y > _height)) { + if ((data == nullptr) || ((x + (w * scale_x) < 0)) || ((y + (h * scale_y) < 0)) || (x > _width) || (y > _height)) { // offscreen return; } - for (int j = 0; j < height; j++) { + int xStart = x; + for (int j = 0; j < h; j++) { uint8_t b = data[j]; - - for (int i = 0; i < width; i++) { - if (b & (1 << (7 - i))) { - set(x + i, y + j, _strokeR, _strokeG, _strokeB); - } else { - set(x + i, y + j, _backgroundR, _backgroundG, _backgroundB); + for (uint8_t ys = 0; ys < scale_y; ys++) { + if (ys >= _height) return; + x = xStart; // reset for each row + for (int i = 0; i < w; i++) { + if (b & (1 << (7 - i))) { + for (uint8_t xs = 0; xs < scale_x; xs++) set(x++, y, _strokeR, _strokeG, _strokeB); + } else { + for (uint8_t xs = 0; xs < scale_x; xs++) set(x++, y, _backgroundR, _backgroundG, _backgroundB); + } + if (x >= _width) break; } + y++; } } } + void ArduinoGraphics::imageRGB(const Image& img, int x, int y, int width, int height) { const uint8_t* data = img.data(); @@ -359,7 +365,7 @@ void ArduinoGraphics::image(const Image& img, int x, int y) void ArduinoGraphics::image(const Image& img, int x, int y, int width, int height) { - if (!img || ((x + width) < 0) || ((y + height) < 0) || (x > _width) || (y > height)) { + if (!img || ((x + width) < 0) || ((y + height) < 0) || (x > _width) || (y > _height)) { // offscreen return; } @@ -428,15 +434,21 @@ void ArduinoGraphics::endText(int scrollDirection) uint8_t strokeG = _strokeG; uint8_t strokeB = _strokeB; - - stroke(_textR, _textG, _textB); - if (scrollDirection == SCROLL_LEFT) { - int scrollLength = _textBuffer.length() * textFontWidth() + _textX; + int scrollLength = _textBuffer.length() * textFontWidth() + _textX + 1; for (int i = 0; i < scrollLength; i++) { beginDraw(); - text(_textBuffer, _textX - i, _textY); + + int const text_x = _textX - i; + stroke(_textR, _textG, _textB); + text(_textBuffer, text_x, _textY); + + // clear previous position + const int clearX = text_x + _textBuffer.length() * _font->width; + stroke(_backgroundR, _backgroundG, _backgroundB); + line(clearX, _textY, clearX, _textY + _font->height - 1); + endDraw(); delay(_textScrollSpeed); @@ -446,17 +458,37 @@ void ArduinoGraphics::endText(int scrollDirection) for (int i = 0; i < scrollLength; i++) { beginDraw(); - text(_textBuffer, _textX - (scrollLength - i - 1), _textY); + + int const text_x = _textX - (scrollLength - i - 1); + stroke(_textR, _textG, _textB); + text(_textBuffer, text_x, _textY); + + // clear previous position + const int clearX = text_x - 1; + stroke(_backgroundR, _backgroundG, _backgroundB); + line(clearX, _textY, clearX, _textY + _font->height - 1); + + bitmap(_font->data[0x20], text_x - 1, _textY, 1, _font->height, _textSizeX, _textSizeY); + endDraw(); delay(_textScrollSpeed); } } else if (scrollDirection == SCROLL_UP) { - int scrollLength = textFontHeight() + _textY; + int scrollLength = textFontHeight() + _textY + 1; for (int i = 0; i < scrollLength; i++) { beginDraw(); - text(_textBuffer, _textX, _textY - i); + + int const text_y = _textY - i; + stroke(_textR, _textG, _textB); + text(_textBuffer, _textX, text_y); + + // clear previous position + const int clearY = text_y + _font->height; + stroke(_backgroundR, _backgroundG, _backgroundB); + line(_textX, clearY, _textX + (_font->width * _textBuffer.length()) - 1, clearY); + endDraw(); delay(_textScrollSpeed); @@ -466,13 +498,24 @@ void ArduinoGraphics::endText(int scrollDirection) for (int i = 0; i < scrollLength; i++) { beginDraw(); - text(_textBuffer, _textX, _textY - (scrollLength - i - 1)); + + int const text_y = _textY - (scrollLength - i - 1); + stroke(_textR, _textG, _textB); + text(_textBuffer, _textX, text_y); + + // clear previous position + const int clearY = text_y - 1; + stroke(_backgroundR, _backgroundG, _backgroundB); + line(_textX, clearY, _textX + (_font->width * _textBuffer.length()) - 1, clearY); + + bitmap(_font->data[0x20], _textX, text_y - 1, _font->width, 1, _textSizeX, _textSizeY); endDraw(); delay(_textScrollSpeed); } } else { beginDraw(); + stroke(_textR, _textG, _textB); text(_textBuffer, _textX, _textY); endDraw(); } diff --git a/src/ArduinoGraphics.h b/src/ArduinoGraphics.h index 1f1c914..c409796 100644 --- a/src/ArduinoGraphics.h +++ b/src/ArduinoGraphics.h @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #ifndef _ARDUINO_GRAPHICS_H @@ -51,6 +37,7 @@ class ArduinoGraphics : public Print { void background(uint8_t r, uint8_t g, uint8_t b); void background(uint32_t color); void clear(); + void clear(int x, int y); void fill(uint8_t r, uint8_t g, uint8_t b); void fill(uint32_t color); void noFill(); @@ -70,6 +57,8 @@ class ArduinoGraphics : public Print { virtual void text(const char* str, int x = 0, int y = 0); virtual void text(const String& str, int x = 0, int y = 0) { text(str.c_str(), x, y); } virtual void textFont(const Font& which); + virtual void textSize(uint8_t s) {textSize(s, s);} + virtual void textSize(uint8_t sx, uint8_t sy); virtual int textFontWidth() const; virtual int textFontHeight() const; @@ -91,7 +80,8 @@ class ArduinoGraphics : public Print { virtual void textScrollSpeed(unsigned long speed = 150); protected: - virtual void bitmap(const uint8_t* data, int x, int y, int width, int height); + virtual void bitmap(const uint8_t* data, int x, int y, int w, int h, uint8_t scale_x = 1, + uint8_t scale_y = 1); virtual void imageRGB(const Image& img, int x, int y, int width, int height); virtual void imageRGB24(const Image& img, int x, int y, int width, int height); virtual void imageRGB16(const Image& img, int x, int y, int width, int height); @@ -114,6 +104,8 @@ class ArduinoGraphics : public Print { uint8_t _textR, _textG, _textB; int _textX; int _textY; + uint8_t _textSizeX; + uint8_t _textSizeY; unsigned long _textScrollSpeed; }; diff --git a/src/Font.h b/src/Font.h index f44f9b5..c1d7f46 100644 --- a/src/Font.h +++ b/src/Font.h @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #ifndef _FONT_H diff --git a/src/Font_4x6.c b/src/Font_4x6.c index 257ef73..407527b 100644 --- a/src/Font_4x6.c +++ b/src/Font_4x6.c @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #include "Font.h" diff --git a/src/Font_5x7.c b/src/Font_5x7.c index 3c9a31b..a4ee951 100644 --- a/src/Font_5x7.c +++ b/src/Font_5x7.c @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #include "Font.h" diff --git a/src/Image.cpp b/src/Image.cpp index e7ad1a2..a010491 100644 --- a/src/Image.cpp +++ b/src/Image.cpp @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #include diff --git a/src/Image.h b/src/Image.h index 0483e8e..c8f478f 100644 --- a/src/Image.h +++ b/src/Image.h @@ -1,20 +1,6 @@ /* This file is part of the ArduinoGraphics library. - Copyright (c) 2019 Arduino SA. All rights reserved. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (c) 2025 Arduino SA. All rights reserved. */ #ifndef _IMAGE_H