Clone13
Dependents: SignalProcessLab DigitalSignalAlgorithm_Lab DigitalSignal_Lab
GeometricPrimBase.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 | GeometricPrimBase.h - Geometric primitives 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 | class GeometricPrimBase |
ngtkien | 0:ef139e18ca64 | 23 | { |
ngtkien | 0:ef139e18ca64 | 24 | public: |
ngtkien | 0:ef139e18ca64 | 25 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 26 | /// Draws the point. |
ngtkien | 0:ef139e18ca64 | 27 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 28 | /// <param name="posX">The position x.</param> |
ngtkien | 0:ef139e18ca64 | 29 | /// <param name="posY">The position y.</param> |
ngtkien | 0:ef139e18ca64 | 30 | /// <param name="colorMask">The color mask.</param> |
ngtkien | 0:ef139e18ca64 | 31 | void virtual DrawPoint(int posX, int posY, uint32_t colorMask) = 0; |
ngtkien | 0:ef139e18ca64 | 32 | |
ngtkien | 0:ef139e18ca64 | 33 | //void SetDrawColorMask(uint32_t color) = 0; |
ngtkien | 0:ef139e18ca64 | 34 | |
ngtkien | 0:ef139e18ca64 | 35 | uint32_t virtual GetDrawColor() = 0; |
ngtkien | 0:ef139e18ca64 | 36 | |
ngtkien | 0:ef139e18ca64 | 37 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 38 | /// Draws the line. |
ngtkien | 0:ef139e18ca64 | 39 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 40 | /// <param name="startX">The start x.</param> |
ngtkien | 0:ef139e18ca64 | 41 | /// <param name="startY">The start y.</param> |
ngtkien | 0:ef139e18ca64 | 42 | /// <param name="endX">The end x.</param> |
ngtkien | 0:ef139e18ca64 | 43 | /// <param name="endY">The end y.</param> |
ngtkien | 0:ef139e18ca64 | 44 | void virtual DrawLine(int startX, int startY, int endX, int endY) = 0; |
ngtkien | 0:ef139e18ca64 | 45 | |
ngtkien | 0:ef139e18ca64 | 46 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 47 | /// Draws the circle. |
ngtkien | 0:ef139e18ca64 | 48 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 49 | /// <param name="posX">The position x.</param> |
ngtkien | 0:ef139e18ca64 | 50 | /// <param name="posY">The position y.</param> |
ngtkien | 0:ef139e18ca64 | 51 | /// <param name="radius">The radius.</param> |
ngtkien | 0:ef139e18ca64 | 52 | void virtual DrawCircle(int posX, int posY, uint16_t radius) = 0; |
ngtkien | 0:ef139e18ca64 | 53 | |
ngtkien | 0:ef139e18ca64 | 54 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 55 | /// Draws the rectangle. |
ngtkien | 0:ef139e18ca64 | 56 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 57 | /// <param name="startX">The start x.</param> |
ngtkien | 0:ef139e18ca64 | 58 | /// <param name="startY">The start y.</param> |
ngtkien | 0:ef139e18ca64 | 59 | /// <param name="endX">The end x.</param> |
ngtkien | 0:ef139e18ca64 | 60 | /// <param name="endY">The end y.</param> |
ngtkien | 0:ef139e18ca64 | 61 | void virtual DrawRectangle(int startX, int startY, int endX, int endY) = 0; |
ngtkien | 0:ef139e18ca64 | 62 | |
ngtkien | 0:ef139e18ca64 | 63 | /// <summary> |
ngtkien | 0:ef139e18ca64 | 64 | /// Draws the triangle. |
ngtkien | 0:ef139e18ca64 | 65 | /// </summary> |
ngtkien | 0:ef139e18ca64 | 66 | /// <param name="x1">The x1.</param> |
ngtkien | 0:ef139e18ca64 | 67 | /// <param name="y1">The y1.</param> |
ngtkien | 0:ef139e18ca64 | 68 | /// <param name="x2">The x2.</param> |
ngtkien | 0:ef139e18ca64 | 69 | /// <param name="y2">The y2.</param> |
ngtkien | 0:ef139e18ca64 | 70 | /// <param name="x3">The x3.</param> |
ngtkien | 0:ef139e18ca64 | 71 | /// <param name="y3">The y3.</param> |
ngtkien | 0:ef139e18ca64 | 72 | void virtual DrawTriangle(int x1, int y1, int x2, int y2, int x3, int y3) = 0; |
ngtkien | 0:ef139e18ca64 | 73 | }; |
ngtkien | 0:ef139e18ca64 | 74 |