Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: SignalProcessLab DigitalSignalAlgorithm_Lab DigitalSignal_Lab
DisplayBase.h@1:fc2dc08db78b, 2019-08-28 (annotated)
- Committer:
- ngtkien
- Date:
- Wed Aug 28 17:02:28 2019 +0000
- Revision:
- 1:fc2dc08db78b
- Parent:
- 0:ef139e18ca64
add several command
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ngtkien | 0:ef139e18ca64 | 1 | /* |
ngtkien | 0:ef139e18ca64 | 2 | DisplayBase.h - Graphics display base class declaration |
ngtkien | 0:ef139e18ca64 | 3 | |
ngtkien | 0:ef139e18ca64 | 4 | Copyright(c) 2016 karpent at gmail.com, MIT License |
ngtkien | 0:ef139e18ca64 | 5 | |
ngtkien | 0:ef139e18ca64 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), |
ngtkien | 0:ef139e18ca64 | 7 | to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, |
ngtkien | 0:ef139e18ca64 | 8 | and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions : |
ngtkien | 0:ef139e18ca64 | 9 | |
ngtkien | 0:ef139e18ca64 | 10 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
ngtkien | 0:ef139e18ca64 | 11 | |
ngtkien | 0:ef139e18ca64 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
ngtkien | 0:ef139e18ca64 | 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
ngtkien | 0:ef139e18ca64 | 14 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR |
ngtkien | 0:ef139e18ca64 | 15 | THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
ngtkien | 0:ef139e18ca64 | 16 | */ |
ngtkien | 0:ef139e18ca64 | 17 | |
ngtkien | 0:ef139e18ca64 | 18 | #pragma once |
ngtkien | 0:ef139e18ca64 | 19 | |
ngtkien | 0:ef139e18ca64 | 20 | #include "stdint.h" // for uint32_t, uint16_t, uint8_t; |
ngtkien | 0:ef139e18ca64 | 21 | |
ngtkien | 0:ef139e18ca64 | 22 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 23 | /// Graphics display abstract base class |
ngtkien | 0:ef139e18ca64 | 24 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 25 | class DisplayBase |
ngtkien | 0:ef139e18ca64 | 26 | { |
ngtkien | 0:ef139e18ca64 | 27 | public: |
ngtkien | 0:ef139e18ca64 | 28 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 29 | /// Returns screen width. |
ngtkien | 0:ef139e18ca64 | 30 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 31 | /// <returns></returns> |
ngtkien | 0:ef139e18ca64 | 32 | uint16_t virtual DisplayWidth() = 0; |
ngtkien | 0:ef139e18ca64 | 33 | |
ngtkien | 0:ef139e18ca64 | 34 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 35 | /// Redurns screen height. |
ngtkien | 0:ef139e18ca64 | 36 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 37 | /// <returns></returns> |
ngtkien | 0:ef139e18ca64 | 38 | uint16_t virtual DisplayHeight() = 0; |
ngtkien | 0:ef139e18ca64 | 39 | |
ngtkien | 0:ef139e18ca64 | 40 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 41 | /// Sets the color of the draw. |
ngtkien | 0:ef139e18ca64 | 42 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 43 | /// <param name="red">The red.</param> |
ngtkien | 0:ef139e18ca64 | 44 | /// <param name="green">The green.</param> |
ngtkien | 0:ef139e18ca64 | 45 | /// <param name="blue">The blue.</param> |
ngtkien | 0:ef139e18ca64 | 46 | /// <param name="alpha">The alpha.</param> |
ngtkien | 0:ef139e18ca64 | 47 | void virtual SetDrawColor(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) = 0; |
ngtkien | 0:ef139e18ca64 | 48 | }; |
ngtkien | 0:ef139e18ca64 | 49 |