5#ifndef INCLUDE_FIFECHAN_BACKENDS_OPENGL_GRAPHICS_HPP_
6#define INCLUDE_FIFECHAN_BACKENDS_OPENGL_GRAPHICS_HPP_
8#include "fifechan/backends/opengl/image.hpp"
9#include "fifechan/color.hpp"
10#include "fifechan/graphics.hpp"
11#include "fifechan/platform.hpp"
83 fcn::Image const * image,
int srcX,
int srcY,
int dstX,
int dstY,
int width,
int height)
override;
100 void drawLine(
int x1,
int y1,
int x2,
int y2)
override;
102 void drawLine(
int x1,
int y1,
int x2,
int y2,
unsigned int width)
override;
104 void drawPolyLine(PointVector
const & points,
unsigned int width)
override;
106 void drawBezier(PointVector
const & points,
int steps,
unsigned int width)
override;
Abstract interface providing primitive drawing functions (lines, rectangles, etc.).
virtual void drawImage(Image const *image, int srcX, int srcY, int dstX, int dstY, int width, int height)=0
Draws a part of an image.
Abstract holder for image data.
Represents a 2D coordinate (X, Y).
Represents a rectangular area (X, Y, Width, Height).
OpenGL-specific implementation of the Graphics interface.
void setColor(Color const &color) override
Sets the color to use when drawing.
void drawFillCircle(Point const &p, unsigned int radius) override
Draws a filled circle.
void drawCircleSegment(Point const &p, unsigned int radius, int sangle, int eangle) override
Draws a simple, non-filled circle segment with a one pixel width.
void _beginDraw() override
Initializes drawing.
void drawLine(int x1, int y1, int x2, int y2) override
Draws a line.
void drawCircle(Point const &p, unsigned int radius) override
Draws a simple, non-filled circle with a one pixel width.
bool mAlpha
Whether alpha blending is enabled.
void drawBezier(PointVector const &points, int steps, unsigned int width) override
Draws a bezier curve.
void drawRectangle(Rectangle const &rectangle) override
Draws a simple, non-filled rectangle with a one pixel width.
void drawFillCircleSegment(Point const &p, unsigned int radius, int sangle, int eangle) override
Draws a filled circle segment.
void drawImage(fcn::opengl::Image const *image, int srcX, int srcY, int dstX, int dstY, int width, int height)
Draws an OpenGL-specific image.
void popClipArea() override
Removes the top most clip area from the stack.
void drawPoint(int x, int y) override
Draws a single point/pixel.
Color mColor
Current drawing color.
void _endDraw() override
Deinitializes the drawing process.
void fillRectangle(Rectangle const &rectangle) override
Draws a filled rectangle.
void drawImage(fcn::Image const *image, int srcX, int srcY, int dstX, int dstY, int width, int height) override
Draws a part of an image.
int mWidth
Width of the logical target plane.
void drawPolyLine(PointVector const &points, unsigned int width) override
Draws lines between points with given width.
virtual void setTargetPlane(int width, int height)
Sets the target plane on where to draw.
virtual int getTargetPlaneWidth() const
Gets the target plane width.
int mHeight
Height of the logical target plane.
virtual int getTargetPlaneHeight() const
Gets the target plane height.
Color const & getColor() const override
Gets the color to use when drawing.
bool pushClipArea(Rectangle area) override
Pushes a clip area onto the stack.
OpenGL-specific implementation of Image.