mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 06:53:43 +00:00
Major draw code refactor
This commit is contained in:
@@ -3,23 +3,34 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "GpPixelFormat.h"
|
||||
#include "PLHandle.h"
|
||||
#include "QDState.h"
|
||||
#include "QDPort.h"
|
||||
|
||||
namespace PortabilityLayer
|
||||
{
|
||||
class FontFamily;
|
||||
struct RGBAColor;
|
||||
class ScanlineMask;
|
||||
}
|
||||
|
||||
struct PixMap;
|
||||
struct Picture;
|
||||
struct Point;
|
||||
struct Rect;
|
||||
struct IGpDisplayDriver;
|
||||
struct IGpDisplayDriverSurface;
|
||||
class PLPasStr;
|
||||
|
||||
struct CGraf final
|
||||
struct DrawSurface final
|
||||
{
|
||||
CGraf()
|
||||
: m_port(PortabilityLayer::QDPortType_CGraf)
|
||||
DrawSurface()
|
||||
: m_port(PortabilityLayer::QDPortType_DrawSurface)
|
||||
, m_ddSurface(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
explicit CGraf(PortabilityLayer::QDPortType overridePortType)
|
||||
explicit DrawSurface(PortabilityLayer::QDPortType overridePortType)
|
||||
: m_port(overridePortType)
|
||||
, m_ddSurface(nullptr)
|
||||
{
|
||||
@@ -40,6 +51,40 @@ struct CGraf final
|
||||
|
||||
void PushToDDSurface(IGpDisplayDriver *displayDriver);
|
||||
|
||||
void FillRect(const Rect &rect);
|
||||
void FillRectWithPattern8x8(const Rect &rect, const uint8_t *pattern);
|
||||
void FrameRect(const Rect &rect);
|
||||
void InvertFrameRect(const Rect &rect, const uint8_t *pattern);
|
||||
void InvertFillRect(const Rect &rect, const uint8_t *pattern);
|
||||
|
||||
void FillEllipse(const Rect &rect);
|
||||
void FrameEllipse(const Rect &rect);
|
||||
|
||||
void FillScanlineMask(const PortabilityLayer::ScanlineMask *scanlineMask);
|
||||
|
||||
void DrawLine(const Point &a, const Point &b);
|
||||
void InvertDrawLine(const Point &a, const Point &b, const uint8_t *pattern);
|
||||
|
||||
void SetForeColor(const PortabilityLayer::RGBAColor &color);
|
||||
const PortabilityLayer::RGBAColor &GetForeColor() const;
|
||||
|
||||
void SetBackColor(const PortabilityLayer::RGBAColor &color);
|
||||
const PortabilityLayer::RGBAColor &GetBackColor() const;
|
||||
|
||||
void SetApplicationFont(int size, int variationFlags);
|
||||
void SetSystemFont(int size, int variationFlags);
|
||||
void DrawString(const Point &point, const PLPasStr &str);
|
||||
|
||||
void DrawPicture(THandle<Picture> pictHandle, const Rect &rect);
|
||||
|
||||
void SetPattern8x8(const uint8_t *pattern);
|
||||
void ClearPattern();
|
||||
|
||||
void SetMaskMode(bool maskMode);
|
||||
|
||||
Rect GetClipRect() const;
|
||||
void SetClipRect(const Rect &rect);
|
||||
|
||||
// Must be the first item
|
||||
PortabilityLayer::QDPort m_port;
|
||||
|
||||
|
Reference in New Issue
Block a user