91 switch (mDrawingType) {
94 if constexpr (std::is_integral_v<T>)
95 return SDL_RenderDrawLine(context.
get(), p0.x, p0.y, p1.x, p1.y) == 0;
97 return SDL_RenderDrawLineF(context.
get(), p0.x, p0.y, p1.x, p1.y) == 0;
100 if constexpr (std::is_integral_v<T>)
101 drawLine(context, p0.template as<float>(), p1.template as<float>(), mWidth);
void setWidthColor(gm::Context &context, int width, color::RGBA rgba, Size &widgetSize)
Set the width and colour of a line to be drawn.
Definition: AntiAliasedDrawing.cpp:16
void setColor(gm::Context &context, color::RGBA rgba, Size &widgetSize)
Set the colour of the line to be drawn.
Definition: AntiAliasedDrawing.h:67
Red Green Blue Alpha representation of a color.
Definition: Color.h:64
Definition: AntiAliasedDrawing.h:23
Simple lines, no anti-aliasing.
Definition: AntiAliasedDrawing.h:30
Modified Wu's algorithm anti-aliaseing.
Definition: AntiAliasedDrawing.h:31
Abstraction of SDL_Texture.
Definition: Texture.h:46
Context
Definition: GraphicsModel.h:76
Abstraction of the graphics model.
void drawLine(gm::Context &context, Position< float > p0, Position< float > p1, int interiorWidth=0)
Implement a modified Xiaolin Wu anti aliasing algorithm.
Definition: AntiAliasedDrawing.cpp:22
bool renderLine(gm::Context &context, Position< T > p0, Position< T > p1)
Draw an anti-aliased line.
Definition: AntiAliasedDrawing.h:90
Store the current draw color replacing it with a new draw color.
Definition: GraphicsModel.h:292
A size in integer dimensions.
Definition: Types.h:230
ToDo: There is an issue that the initial scroll interaction is lost if the click/press lands on a Wid...
Definition: CelestialOverlay.cpp:13
DrawingType
The drawing style used by the drawing engine.
Definition: AntiAliasedDrawing.h:29
auto get() const
Get an opaque pointer for API calls.
Definition: GraphicsModel.h:118