Miroslaw K. / Graphics

Dependents:   RadarDemo 3DDemo RadarDemoT

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GeometricPrimBase.h Source File

GeometricPrimBase.h

00001 /*
00002     GeometricPrimBase.h - Geometric primitives 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 class GeometricPrimBase
00023 {
00024 public:
00025     /// <summary>
00026     /// Draws the point.
00027     /// </summary>
00028     /// <param name="posX">The position x.</param>
00029     /// <param name="posY">The position y.</param>
00030     /// <param name="colorMask">The color mask.</param>
00031     void virtual DrawPoint(int posX, int posY, uint32_t colorMask) = 0;
00032     
00033     //void SetDrawColorMask(uint32_t color) = 0;
00034     
00035     uint32_t virtual GetDrawColor() = 0;
00036 
00037     /// <summary>
00038     /// Draws the line.
00039     /// </summary>
00040     /// <param name="startX">The start x.</param>
00041     /// <param name="startY">The start y.</param>
00042     /// <param name="endX">The end x.</param>
00043     /// <param name="endY">The end y.</param>
00044     void virtual DrawLine(int startX, int startY, int endX, int endY) = 0;
00045 
00046     /// <summary>
00047     /// Draws the circle.
00048     /// </summary>
00049     /// <param name="posX">The position x.</param>
00050     /// <param name="posY">The position y.</param>
00051     /// <param name="radius">The radius.</param>
00052     void virtual DrawCircle(int posX, int posY, uint16_t radius) = 0;
00053 
00054     /// <summary>
00055     /// Draws the rectangle.
00056     /// </summary>
00057     /// <param name="startX">The start x.</param>
00058     /// <param name="startY">The start y.</param>
00059     /// <param name="endX">The end x.</param>
00060     /// <param name="endY">The end y.</param>
00061     void virtual DrawRectangle(int startX, int startY, int endX, int endY) = 0;
00062 
00063     /// <summary>
00064     /// Draws the triangle.
00065     /// </summary>
00066     /// <param name="x1">The x1.</param>
00067     /// <param name="y1">The y1.</param>
00068     /// <param name="x2">The x2.</param>
00069     /// <param name="y2">The y2.</param>
00070     /// <param name="x3">The x3.</param>
00071     /// <param name="y3">The y3.</param>
00072     void virtual DrawTriangle(int x1, int y1, int x2, int y2, int x3, int y3) = 0;
00073 };
00074