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: RadarDemo 3DDemo RadarDemoT
DisplayBase.h
00001 /* 00002 DisplayBase.h - Graphics display base class declaration 00003 00004 Copyright(c) 2016 karpent at gmail.com, MIT License 00005 00006 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"), 00007 to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 00008 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 : 00009 00010 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 00011 00012 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00013 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 00014 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR 00015 THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00016 */ 00017 00018 #pragma once 00019 00020 #include "stdint.h" // for uint32_t, uint16_t, uint8_t; 00021 00022 /// <summary> 00023 /// Graphics display abstract base class 00024 /// </summary> 00025 class DisplayBase 00026 { 00027 public: 00028 /// <summary> 00029 /// Returns screen width. 00030 /// </summary> 00031 /// <returns></returns> 00032 uint16_t virtual DisplayWidth() = 0; 00033 00034 /// <summary> 00035 /// Redurns screen height. 00036 /// </summary> 00037 /// <returns></returns> 00038 uint16_t virtual DisplayHeight() = 0; 00039 00040 /// <summary> 00041 /// Sets the color of the foreground. 00042 /// </summary> 00043 /// <param name="red">The red.</param> 00044 /// <param name="green">The green.</param> 00045 /// <param name="blue">The blue.</param> 00046 /// <param name="alpha">The alpha.</param> 00047 void virtual SetDrawColor(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) = 0; 00048 00049 /// <summary> 00050 /// Sets the color of the background. 00051 /// </summary> 00052 /// <param name="red">The red.</param> 00053 /// <param name="green">The green.</param> 00054 /// <param name="blue">The blue.</param> 00055 /// <param name="alpha">The alpha.</param> 00056 void virtual SetClearColor(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha) = 0; 00057 00058 /// <summary> 00059 /// Clears the display. 00060 /// </summary> 00061 void virtual Clear() = 0; 00062 }; 00063
Generated on Thu Jul 14 2022 02:25:58 by
