1#ifndef __SRENDER_I__H__
2#define __SRENDER_I__H__
4#include <interface/obj-ref-i.h>
6#include <interface/SGradient-i.h>
7#include <interface/SPathEffect-i.h>
9#include <interface/sxml-i.h>
16typedef enum EXPEND_MODE
23typedef enum FilterLevel
25 kUndef_FilterLevel = 100,
26 kNone_FilterLevel = 0,
32typedef enum GradientType
59 kLastCoeffMode = kScreen_Mode,
71 kLastSeparableMode = kMultiply_Mode,
80 kDstInvert = DSTINVERT,
81 kSrcInvert = SRCINVERT,
92 float fLeft, fTop, fRight, fBottom;
95typedef enum _BlurStyle
98 kNormal_BlurStyle = 0,
103 kLastEnum_BlurStyle = kInner_BlurStyle
106typedef enum _BlurFlags
108 kNone_BlurFlag = 0x00,
110 kIgnoreTransform_BlurFlag = 0x01,
112 kHighQuality_BlurFlag = 0x02,
119#define INTERFACE IMaskFilter
120DECLARE_INTERFACE_(IMaskFilter,
IObjRef)
123 STDMETHOD_(
void *, GetPtr)(THIS) PURE;
143#define INTERFACE IRenderObj
199typedef enum _BrushType
206typedef enum _TileMode
229#define INTERFACE IBrushS
305#define INTERFACE IPenS
406 STDMETHOD_(
void,
SetColor)(THIS_ COLORREF cr) PURE;
418#define INTERFACE IBitmapS
477 STDMETHOD_(HRESULT,
Init)(THIS_
int nWid,
int nHei,
const LPVOID pBits) PURE;
517 STDMETHOD_(UINT,
Width)(CTHIS) SCONST PURE;
526 STDMETHOD_(UINT,
Height)(CTHIS) SCONST PURE;
535 STDMETHOD_(SIZE,
Size)(CTHIS) SCONST PURE;
585 (CTHIS_
IBitmapS * *pOutput,
int nScale, FilterLevel filterLevel) SCONST PURE;
599 (CTHIS_
IBitmapS * *pOutput,
int nWid,
int nHei, FilterLevel filterLevel) SCONST PURE;
610 STDMETHOD_(HRESULT,
Save)(THIS_ LPCWSTR pszFileName,
const LPVOID pFormat) SCONST PURE;
621 STDMETHOD_(HRESULT,
Save2)(THIS_ LPCWSTR pszFileName, ImgFmt imgFmt) SCONST PURE;
632typedef enum _FillStyle
636 kStrokeAndFill_Style = 2,
648#define INTERFACE IFontS
704 STDMETHOD_(
const LOGFONT *,
LogFont)(CTHIS) SCONST PURE;
731 STDMETHOD_(BOOL,
IsBold)(CTHIS) SCONST PURE;
768 STDMETHOD_(BOOL,
UpdateFont)(THIS_
const LOGFONT *pLogFont) PURE;
790#define INTERFACE IRegionS
847 STDMETHOD_(
void,
CombineRect)(THIS_ LPCRECT lprect,
int nCombineMode) PURE;
868 STDMETHOD_(
void,
CombineRoundRect)(THIS_ LPCRECT lprect, POINT ptConner,
int nCombineMode) PURE;
890 STDMETHOD_(
void,
CombinePolygon)(THIS_
const POINT *pts,
int count,
int nPolygonMode,
int nCombineMode) PURE;
919 STDMETHOD_(
void,
GetRgnBox)(CTHIS_ LPRECT lprect) SCONST PURE;
937 STDMETHOD_(
void,
Offset)(THIS_ POINT pt) PURE;
953typedef enum _xFormIndex
984typedef enum _FillType
993 kInverseWinding_FillType,
996 kInverseEvenOdd_FillType
1005typedef enum _Direction
1024#define INTERFACE IPathS
1035 STDMETHOD_(
long, AddRef)(THIS) PURE;
1045 STDMETHOD_(
long, Release)(THIS) PURE;
1053 STDMETHOD_(
void, OnFinalRelease)(THIS) PURE;
1060 STDMETHOD_(
IRenderFactory *, GetRenderFactory)(CTHIS) SCONST PURE;
1067 STDMETHOD_(OBJTYPE, ObjectType)(CTHIS) SCONST PURE;
1074 STDMETHOD_(FillType, getFillType)(CTHIS) SCONST PURE;
1081 STDMETHOD_(
void, setFillType)(THIS_ FillType ft) PURE;
1087 STDMETHOD_(
void, reset)(THIS) PURE;
1094 STDMETHOD_(BOOL, isEmpty)(CTHIS) SCONST PURE;
1101 STDMETHOD_(
void, getBounds)(CTHIS_ LPRECT prc) SCONST PURE;
1111 STDMETHOD_(
void, moveTo)(THIS_
float x,
float y) PURE;
1119 STDMETHOD_(
void, rMoveTo)(THIS_
float dx,
float dy) PURE;
1127 STDMETHOD_(
void, lineTo)(THIS_
float x,
float y) PURE;
1135 STDMETHOD_(
void, rLineTo)(THIS_
float dx,
float dy) PURE;
1145 STDMETHOD_(
void, quadTo)(THIS_
float x1,
float y1,
float x2,
float y2) PURE;
1155 STDMETHOD_(
void, rQuadTo)(THIS_
float dx1,
float dy1,
float dx2,
float dy2) PURE;
1166 STDMETHOD_(
void, conicTo)(THIS_
float x1,
float y1,
float x2,
float y2,
float w) PURE;
1177 STDMETHOD_(
void, rConicTo)(THIS_
float dx1,
float dy1,
float dx2,
float dy2,
float w) PURE;
1189 STDMETHOD_(
void, cubicTo)(THIS_
float x1,
float y1,
float x2,
float y2,
float x3,
float y3) PURE;
1201 STDMETHOD_(
void, rCubicTo)(THIS_
float x1,
float y1,
float x2,
float y2,
float x3,
float y3) PURE;
1209 STDMETHOD_(
void, addRect)(THIS_
const RECT *rect, Direction dir DEF_VAL(kCW_Direction)) PURE;
1220 STDMETHOD_(
void, addRect2)(THIS_
float left,
float top,
float right,
float bottom, Direction dir DEF_VAL(kCW_Direction)) PURE;
1228 STDMETHOD_(
void, addOval)(THIS_
const RECT *oval, Direction dir DEF_VAL(kCW_Direction)) PURE;
1239 STDMETHOD_(
void, addOval2)(THIS_
float left,
float top,
float right,
float bottom, Direction dir DEF_VAL(kCW_Direction)) PURE;
1249 STDMETHOD_(
void, addCircle)(THIS_
float x,
float y,
float radius, Direction dir DEF_VAL(kCW_Direction)) PURE;
1258 STDMETHOD_(
void, addArc)(THIS_
const RECT *oval,
float startAngle,
float sweepAngle) PURE;
1270 STDMETHOD_(
void, addArc2)(THIS_
float left,
float top,
float right,
float bottom,
float startAngle,
float sweepAngle) PURE;
1280 STDMETHOD_(
void, addRoundRect)(THIS_
const RECT *rect,
float rx,
float ry, Direction dir DEF_VAL(kCW_Direction)) PURE;
1293 STDMETHOD_(
void, addRoundRect2)(THIS_
float left,
float top,
float right,
float bottom,
float rx,
float ry, Direction dir DEF_VAL(kCW_Direction)) PURE;
1302 STDMETHOD_(
void, addPoly)(THIS_
const POINT pts[],
int count, BOOL close) PURE;
1310 STDMETHOD_(
void, offset)(THIS_
float dx,
float dy) PURE;
1317 STDMETHOD_(
void, transform)(THIS_
const IxForm *matrix) PURE;
1325 STDMETHOD_(BOOL, getLastPt)(CTHIS_ fPoint * lastPt) SCONST PURE;
1336 STDMETHOD_(
void, addString)(THIS_ LPCTSTR pszText,
int nLen,
float x,
float y,
const IFontS *pFont) PURE;
1343 STDMETHOD_(IPathS *, clone)(CTHIS) SCONST PURE;
1353 STDMETHOD_(BOOL, beginFigure)(THIS_
float x,
float y, BOOL bFill DEF_VAL(TRUE)) PURE;
1361 STDMETHOD_(BOOL, endFigure)(THIS_ BOOL bClose) PURE;
1368 STDMETHOD_(
float, getLength)(CTHIS) SCONST PURE;
1378 STDMETHOD_(BOOL, getPosTan)(CTHIS_
float distance, fPoint *pos, fPoint *vec) SCONST PURE;
1384 STDMETHOD_(
void, close)(THIS) PURE;
1393 STDMETHOD_(BOOL, hitTest)(CTHIS_
float x,
float y) SCONST PURE;
1403 STDMETHOD_(BOOL, hitTestStroke)(CTHIS_
float x,
float y,
float strokeSize) SCONST PURE;
1438#define INTERFACE IRenderTarget
1482 STDMETHOD_(HRESULT,
CreatePen)(THIS_
int iStyle, COLORREF cr,
int cWidth,
IPenS **ppPen) PURE;
1512 STDMETHOD_(HRESULT,
CreateGradientBrush)(THIS_
const GradientItem *pGradients,
int nCount,
const GradientInfo *info, BYTE byAlpha, TileMode tileMode,
IBrushS **ppBrush) PURE;
1526 STDMETHOD_(HRESULT,
Resize)(THIS_ SIZE sz) PURE;
1535 STDMETHOD_(HRESULT,
OffsetViewportOrg)(THIS_
int xOff,
int yOff, LPPOINT lpPoint DEF_VAL(NULL)) PURE;
1557 STDMETHOD_(HRESULT,
PushClipRect)(THIS_ LPCRECT pRect, UINT mode DEF_VAL(RGN_AND)) PURE;
1585 STDMETHOD_(HRESULT,
SaveClip)(THIS_
int *pnState) PURE;
1616 STDMETHOD_(HRESULT,
DrawText)(THIS_ LPCTSTR pszText,
int cchLen, LPRECT pRc, UINT uFormat) PURE;
1625 STDMETHOD_(HRESULT,
MeasureText)(THIS_ LPCTSTR pszText,
int cchLen, SIZE *psz) PURE;
1635 STDMETHOD_(HRESULT,
TextOut)(THIS_
int x,
int y, LPCTSTR lpszString,
int nCount) PURE;
1690 STDMETHOD_(HRESULT,
ClearRect)(THIS_ LPCRECT pRect, COLORREF cr) PURE;
1729 STDMETHOD_(HRESULT,
DrawArc)(THIS_ LPCRECT pRect,
float startAngle,
float sweepAngle, BOOL useCenter) PURE;
1739 STDMETHOD_(HRESULT,
DrawArc2)(THIS_ LPCRECT pRect,
float startAngle,
float sweepAngle,
int width) PURE;
1748 STDMETHOD_(HRESULT,
FillArc)(THIS_ LPCRECT pRect,
float startAngle,
float sweepAngle) PURE;
1756 STDMETHOD_(HRESULT,
DrawLines)(THIS_ LPPOINT pPt,
size_t nCount) PURE;
1768 STDMETHOD_(HRESULT,
DrawGradientRect)(THIS_ LPCRECT pRect, BOOL bVert, POINT ptRoundCorner,
const GradientItem *pGradients,
int nCount, BYTE byAlpha DEF_VAL(0xFF)) PURE;
1780 STDMETHOD_(HRESULT,
DrawGradientRectEx)(THIS_ LPCRECT pRect, POINT ptRoundCorner,
const GradientItem *pGradients,
int nCount,
const GradientInfo *info, BYTE byAlpha DEF_VAL(0xFF)) PURE;
1791 STDMETHOD_(HRESULT,
DrawGradientPath)(THIS_
const IPathS *path,
const GradientItem *pGradients,
int nCount,
const GradientInfo *info, BYTE byAlpha DEF_VAL(0xFF)) PURE;
1803 STDMETHOD_(HRESULT,
DrawIconEx)(THIS_
int xLeft,
int yTop, HICON hIcon,
int cxWidth,
int cyWidth, UINT diFlags) PURE;
1814 STDMETHOD_(HRESULT,
DrawBitmap)(THIS_ LPCRECT pRcDest,
const IBitmapS *pBitmap,
int xSrc,
int ySrc, BYTE byAlpha DEF_VAL(0xFF)) PURE;
1826 (THIS_ LPCRECT pRcDest,
const IBitmapS *pBitmap, LPCRECT pRcSrc, UINT expendMode, BYTE byAlpha DEF_VAL(0xFF)) PURE;
1839 (THIS_ LPCRECT pRcDest,
const IBitmapS *pBitmap, LPCRECT pRcSrc, LPCRECT pRcSourMargin, UINT expendMode, BYTE byAlpha DEF_VAL(0xFF)) PURE;
1851 (THIS_ LPCRECT pRcDest,
IRenderTarget * pRTSour,
int xSrc,
int ySrc, DWORD dwRop DEF_VAL(kSrcCopy)) PURE;
1862 (THIS_ LPCRECT pRcDest,
IRenderTarget * pRTSrc, LPCRECT pRcSrc, BYTE byAlpha) PURE;
1878 (THIS_ OBJTYPE objType,
IRenderObj * *pOldObj DEF_VAL(NULL)) PURE;
1919 STDMETHOD_(HDC,
GetDC)(THIS_ UINT uFlag) PURE;
1926 STDMETHOD_(
void,
ReleaseDC)(THIS_ HDC hdc, LPCRECT pRc DEF_VAL(NULL)) PURE;
1935 (THIS_
const float matrix[9],
float oldMatrix[9] DEF_VAL(NULL)) PURE;
1950 STDMETHOD_(COLORREF,
GetPixel)(THIS_
int x,
int y) PURE;
1959 STDMETHOD_(COLORREF,
SetPixel)(THIS_
int x,
int y, COLORREF cr) PURE;
1969 (THIS_
const IPathS *path, UINT mode, BOOL doAntiAlias DEF_VAL(FALSE)) PURE;
1978 (THIS_
const IPathS *path, IPathEffect *pathEffect DEF_VAL(NULL)) PURE;
1985 STDMETHOD_(HRESULT,
FillPath)(THIS_
const IPathS *path) PURE;
1993 STDMETHOD_(HRESULT,
SetXfermode)(THIS_
int mode,
int *pOldMode DEF_VAL(NULL)) PURE;
2016#define INTERFACE IRenderFactory
2056 (THIS_
IRenderTarget * *ppRenderTarget,
int nWid DEF_VAL(0),
int nHei DEF_VAL(0)) PURE;
2105 (THIS_
float radius, BlurStyle style, BlurFlags flag, IMaskFilter **ppMaskFilter) PURE;
2117 (THIS_
float direction[3],
float ambient,
float specular,
float blurRadius, IMaskFilter **ppMaskFilter) PURE;
2125 STDMETHOD_(BOOL,
CreatePathEffect)(THIS_ REFGUID guidEffect, IPathEffect * *ppPathEffect) PURE;
2141typedef IPathS
IPath;
2155typedef BOOL (*FontFallback)(LPCSTR u8FontName,
const wchar_t *pWord,
size_t wordLen,
char u8FontNameFallback[100],
int *charset);
Interface definitions for image decoding.
Structure to define gradient information for creating gradient brushes.
HRESULT Scale(IBitmapS **pOutput, int nScale, FilterLevel filterLevel) SCONST PURE
Scales the bitmap and clones it.
const LPVOID GetPixelBits() SCONST PURE
Retrieves the pixel bits of the bitmap for reading.
IRenderFactory * GetRenderFactory() SCONST PURE
Obtains the render factory that created this rendering object.
UINT Height() SCONST PURE
Retrieves the height of the bitmap.
HRESULT LoadFromMemory(LPBYTE pBuf, size_t szLen) PURE
Loads the bitmap from memory.
SIZE Size() SCONST PURE
Retrieves the size of the bitmap.
void OnFinalRelease() PURE
Called when the final release of the object occurs.
HRESULT Save(LPCWSTR pszFileName, const LPVOID pFormat) SCONST PURE
Saves the bitmap to a file.
UINT Width() SCONST PURE
Retrieves the width of the bitmap.
HRESULT Scale2(IBitmapS **pOutput, int nWid, int nHei, FilterLevel filterLevel) SCONST PURE
Scales the bitmap to specified dimensions and clones it.
HRESULT Init(int nWid, int nHei, const LPVOID pBits) PURE
Initializes the bitmap from 32-bit bitmap data.
long AddRef() PURE
Increments the reference count for the object.
HRESULT Clone(IBitmapS **ppClone) SCONST PURE
Clones the bitmap.
HRESULT Init2(IImgFrame *pImgFrame) PURE
Initializes the bitmap from an IImgFrame object.
OBJTYPE ObjectType() SCONST PURE
Queries the type of the rendering object.
HRESULT Save2(LPCWSTR pszFileName, ImgFmt imgFmt) SCONST PURE
Saves the bitmap to a file with a specified format.
HRESULT LoadFromFile(LPCTSTR pszFileName) PURE
Loads the bitmap from a file.
long Release() PURE
Decrements the reference count for the object.
LPVOID LockPixelBits() PURE
Locks the pixel bits of the bitmap for writing.
void UnlockPixelBits(LPVOID pBuf) PURE
Unlocks the pixel bits of the bitmap.
long Release() PURE
Decrements the reference count for the object.
BrushType GetBrushType() SCONST PURE
Queries the type of the brush.
void OnFinalRelease() PURE
Called when the final release of the object occurs.
IRenderFactory * GetRenderFactory() SCONST PURE
Obtains the render factory that created this rendering object.
long AddRef() PURE
Increments the reference count for the object.
OBJTYPE ObjectType() SCONST PURE
Queries the type of the rendering object.
BOOL IsBold() SCONST PURE
Checks if the font is bold.
BOOL IsStrikeOut() SCONST PURE
Checks if the font has a strikeout.
IRenderFactory * GetRenderFactory() SCONST PURE
Obtains the render factory that created this rendering object.
LPCTSTR FamilyName() SCONST PURE
Retrieves the family name of the font.
int TextSize() SCONST PURE
Retrieves the text size of the font.
OBJTYPE ObjectType() SCONST PURE
Queries the type of the rendering object.
BOOL IsItalic() SCONST PURE
Checks if the font is italic.
BOOL IsUnderline() SCONST PURE
Checks if the font has an underline.
long AddRef() PURE
Increments the reference count for the object.
const LOGFONT * LogFont() SCONST PURE
Retrieves the LOGFONT structure of the font.
void SetProp(IXmlNode *pXmlNode) PURE
Sets properties from an XML node.
BOOL UpdateFont(const LOGFONT *pLogFont) PURE
Updates the font properties.
void OnFinalRelease() PURE
Called when the final release of the object occurs.
long Release() PURE
Decrements the reference count for the object.
Interface for image decoder factory.
Interface for an image frame.
Interface for reference counting.
Interface for path objects.
int GetWidth() SCONST PURE
Retrieves the width of the pen.
OBJTYPE ObjectType() SCONST PURE
Queries the type of the rendering object.
void SetColor(COLORREF cr) PURE
Sets the color of the pen.
void OnFinalRelease() PURE
Called when the final release of the object occurs.
int GetStyle() SCONST PURE
Retrieves the style of the pen.
void SetStyle(int nStyle) PURE
Sets the style of the pen.
void SetWidth(int nWid) PURE
Sets the width of the pen.
IRenderFactory * GetRenderFactory() SCONST PURE
Obtains the render factory that created this rendering object.
long AddRef() PURE
Increments the reference count for the object.
long Release() PURE
Decrements the reference count for the object.
COLORREF GetColor() SCONST PURE
Retrieves the color of the pen.
long Release() PURE
Decrements the reference count for the object.
void Clear() PURE
Clears the region.
IRenderFactory * GetRenderFactory() SCONST PURE
Obtains the render factory that created this rendering object.
void Offset(POINT pt) PURE
Offsets the region by a specified amount.
void OnFinalRelease() PURE
Called when the final release of the object occurs.
void CombineRgn(const IRegionS *pRgnSrc, int nCombineMode) PURE
Combines another region with the current region.
BOOL PtInRegion(POINT pt) SCONST PURE
Checks if a point is inside the region.
void CombineEllipse(LPCRECT lprect, int nCombineMode) PURE
Combines an ellipse with the region.
BOOL IsEmpty() SCONST PURE
Checks if the region is empty.
void CombinePolygon(const POINT *pts, int count, int nPolygonMode, int nCombineMode) PURE
Combines a polygon with the region.
void GetRgnBox(LPRECT lprect) SCONST PURE
Retrieves the bounding rectangle of the region.
BOOL RectInRegion(LPCRECT lprect) SCONST PURE
Checks if a rectangle intersects with the region.
long AddRef() PURE
Increments the reference count for the object.
void CombineRoundRect(LPCRECT lprect, POINT ptConner, int nCombineMode) PURE
Combines a rounded rectangle with the region.
void CombineRect(LPCRECT lprect, int nCombineMode) PURE
Combines a rectangle with the region.
OBJTYPE ObjectType() SCONST PURE
Queries the type of the rendering object.
HRESULT CreateBlurMaskFilter(float radius, BlurStyle style, BlurFlags flag, IMaskFilter **ppMaskFilter) PURE
Creates a blur mask filter with specified parameters.
BOOL CreateBitmap(IBitmapS **ppBitmap) PURE
Creates a bitmap object.
HRESULT CreateEmbossMaskFilter(float direction[3], float ambient, float specular, float blurRadius, IMaskFilter **ppMaskFilter) PURE
Creates an emboss mask filter with specified parameters.
long AddRef() PURE
Increments the reference count of the object.
long Release() PURE
Decrements the reference count of the object.
BOOL CreatePathEffect(REFGUID guidEffect, IPathEffect **ppPathEffect) PURE
Creates a path effect with specified GUID.
IFontS * GetDefFont() PURE
Retrieves the default font object.
BOOL CreatePath(IPathS **ppPath) PURE
Creates a path object.
IImgDecoderFactory * GetImgDecoderFactory() PURE
Retrieves the image decoder factory associated with this render factory.
BOOL CreateRenderTarget(IRenderTarget **ppRenderTarget, int nWid=0, int nHei=0) PURE
Creates a render target with specified dimensions.
BOOL CreateRegion(IRegionS **ppRgn) PURE
Creates a region object.
BOOL CreateRenderTarget2(IRenderTarget **ppRenderTarget, HWND hWnd) PURE
Creates a render target associated with a specific window handle.
BOOL CreateFont(IFontS **ppFont, const LOGFONT *lf) PURE
Creates a font object with specified attributes.
void SetImgDecoderFactory(IImgDecoderFactory *pImgDecoderFac) PURE
Sets the image decoder factory for this render factory.
void OnFinalRelease() PURE
Final release of the object, performing cleanup if necessary.
Base class for all renderable objects.
long AddRef() PURE
Increments the reference count for the object.
OBJTYPE ObjectType() SCONST PURE
Queries the type of the rendering object.
long Release() PURE
Decrements the reference count for the object.
IRenderFactory * GetRenderFactory() SCONST PURE
Obtains the render factory that created this rendering object.
void OnFinalRelease() PURE
Called when the final release of the object occurs.
Interface for rendering target objects.
HRESULT DrawRectangle(LPCRECT pRect) PURE
Draw a rectangle outline.
HRESULT DrawBitmap(LPCRECT pRcDest, const IBitmapS *pBitmap, int xSrc, int ySrc, BYTE byAlpha=0xFF) PURE
Draw a bitmap.
HRESULT DrawText(LPCTSTR pszText, int cchLen, LPRECT pRc, UINT uFormat) PURE
Draw text within a rectangle.
HRESULT FillSolidRoundRect(LPCRECT pRect, POINT pt, COLORREF cr) PURE
Fill a rounded rectangle with a solid color.
HRESULT DrawEllipse(LPCRECT pRect) PURE
Draw an ellipse outline.
HRESULT SetViewportOrg(POINT pt) PURE
Set the viewport origin.
HRESULT FillEllipse(LPCRECT pRect) PURE
Fill an ellipse with the current brush.
HRESULT CreateRegion(IRegionS **ppRegion) PURE
Create a region object.
HRESULT FillPath(const IPathS *path) PURE
Fills the interior of a path using the currently selected brush.
HRESULT DrawBitmapEx(LPCRECT pRcDest, const IBitmapS *pBitmap, LPCRECT pRcSrc, UINT expendMode, BYTE byAlpha=0xFF) PURE
Draws a bitmap with expansion mode.
HRESULT AlphaBlend(LPCRECT pRcDest, IRenderTarget *pRTSrc, LPCRECT pRcSrc, BYTE byAlpha) PURE
Performs an alpha-blended transfer from one render target to another.
HRESULT DrawArc(LPCRECT pRect, float startAngle, float sweepAngle, BOOL useCenter) PURE
Draw an arc.
COLORREF GetPixel(int x, int y) PURE
Retrieves the color of a specific pixel.
HRESULT CreateGradientBrush(const GradientItem *pGradients, int nCount, const GradientInfo *info, BYTE byAlpha, TileMode tileMode, IBrushS **ppBrush) PURE
Create a gradient brush.
long Release() PURE
Decrement the reference count and destroy the object if the count reaches zero.
IMaskFilter * GetMaskFilter() PURE
Retrieves the current mask filter.
HRESULT DrawArc2(LPCRECT pRect, float startAngle, float sweepAngle, int width) PURE
Draw an arc with a specified line width.
HRESULT DrawGradientRectEx(LPCRECT pRect, POINT ptRoundCorner, const GradientItem *pGradients, int nCount, const GradientInfo *info, BYTE byAlpha=0xFF) PURE
Draw an extended gradient-filled rectangle.
HRESULT GetTransform(float matrix[9]) SCONST PURE
Retrieves the current coordinate transformation matrix.
HRESULT BitBlt(LPCRECT pRcDest, IRenderTarget *pRTSour, int xSrc, int ySrc, DWORD dwRop=kSrcCopy) PURE
Performs a bit-block transfer (BitBlt) operation.
BOOL IsOffscreen() SCONST PURE
Check if the render target is offscreen.
HDC GetDC(UINT uFlag) PURE
Retrieves a device context (DC) compatible with the render target.
IRenderObj * GetCurrentObject(OBJTYPE uType) PURE
Retrieves the current rendering object of the specified type.
HRESULT DrawPath(const IPathS *path, IPathEffect *pathEffect=NULL) PURE
Draws the outline of a path using the currently selected pen.
HRESULT CreateBitmapBrush(IBitmapS *pBmp, TileMode xtm, TileMode ytm, IBrushS **ppBrush) PURE
Create a bitmap brush.
HRESULT SelectObject(IRenderObj *pObj, IRenderObj **pOldObj=NULL) PURE
Selects a new rendering object and optionally retrieves the previous one.
void OnFinalRelease() PURE
Called when the reference count reaches zero.
HRESULT SetTransform(const float matrix[9], float oldMatrix[9]=NULL) PURE
Sets the coordinate transformation matrix.
HRESULT SetXfermode(int mode, int *pOldMode=NULL) PURE
Sets the transfer mode for drawing operations.
HRESULT FillArc(LPCRECT pRect, float startAngle, float sweepAngle) PURE
Fill an arc.
HRESULT GetViewportOrg(LPPOINT lpPoint) PURE
Get the current viewport origin.
HRESULT CreateSolidColorBrush(COLORREF cr, IBrushS **ppBrush) PURE
Create a solid color brush.
void EndDraw() PURE
End a drawing operation.
HRESULT PushClipRect(LPCRECT pRect, UINT mode=RGN_AND) PURE
Push a rectangular clip region.
HRESULT CreatePen(int iStyle, COLORREF cr, int cWidth, IPenS **ppPen) PURE
Create a pen object.
HRESULT RestoreClip(int nState=-1) PURE
Restore a previously saved clip state.
HRESULT PopClip() PURE
Pop the last clip region from the stack.
HRESULT DrawGradientPath(const IPathS *path, const GradientItem *pGradients, int nCount, const GradientInfo *info, BYTE byAlpha=0xFF) PURE
Draw a gradient-filled path.
HRESULT Resize(SIZE sz) PURE
Resize the render target.
HRESULT FillSolidRect(LPCRECT pRect, COLORREF cr) PURE
Fill a rectangle with a solid color.
HRESULT FillRectangle(LPCRECT pRect) PURE
Fill a rectangle with the current brush.
HRESULT DrawBitmap9Patch(LPCRECT pRcDest, const IBitmapS *pBitmap, LPCRECT pRcSrc, LPCRECT pRcSourMargin, UINT expendMode, BYTE byAlpha=0xFF) PURE
Draws a 9-patch bitmap.
HRESULT DrawRoundRect(LPCRECT pRect, POINT pt) PURE
Draw a rounded rectangle outline.
HRESULT SelectDefaultObject(OBJTYPE objType, IRenderObj **pOldObj=NULL) PURE
Resets the specified rendering object to its default state.
void BeginDraw() PURE
Start a drawing operation.
HRESULT FillRoundRect(LPCRECT pRect, POINT pt) PURE
Fill a rounded rectangle with the current brush.
HRESULT PushClipPath(const IPathS *path, UINT mode, BOOL doAntiAlias=FALSE) PURE
Modifies the current clipping region using a path.
HRESULT DrawGradientRect(LPCRECT pRect, BOOL bVert, POINT ptRoundCorner, const GradientItem *pGradients, int nCount, BYTE byAlpha=0xFF) PURE
Draw a gradient-filled rectangle.
HRESULT SaveClip(int *pnState) PURE
Save the current clip state.
HRESULT GetClipBox(LPRECT prc) PURE
Get the bounding box of the current clip region.
HRESULT TextOut(int x, int y, LPCTSTR lpszString, int nCount) PURE
Output text at a specified position.
HRESULT OffsetViewportOrg(int xOff, int yOff, LPPOINT lpPoint=NULL) PURE
Offset the viewport origin.
HRESULT GetClipRegion(IRegionS **ppRegion) PURE
Get the current clip region.
long AddRef() PURE
Increment the reference count.
HRESULT InvertRect(LPCRECT pRect) PURE
Invert the colors in a rectangle.
COLORREF GetTextColor() PURE
Retrieves the current text color.
HRESULT ClearRect(LPCRECT pRect, COLORREF cr) PURE
Clear a rectangle with a solid color.
BOOL GetAntiAlias() SCONST PURE
Retrieves the current anti-aliasing state.
HRESULT FillSolidEllipse(LPCRECT pRect, COLORREF cr) PURE
Fill an ellipse with a solid color.
BOOL SetAntiAlias(BOOL bAntiAlias) PURE
Enables or disables anti-aliasing for drawing operations.
COLORREF SetTextColor(COLORREF color) PURE
Sets the current text color.
HRESULT DrawLines(LPPOINT pPt, size_t nCount) PURE
Draw a series of connected lines.
HRESULT PushClipRegion(IRegionS *pRegion, UINT mode=RGN_AND) PURE
Push a region-based clip.
void ReleaseDC(HDC hdc, LPCRECT pRc=NULL) PURE
Releases a previously retrieved device context (DC).
COLORREF SetPixel(int x, int y, COLORREF cr) PURE
Sets the color of a specific pixel.
HRESULT DrawIconEx(int xLeft, int yTop, HICON hIcon, int cxWidth, int cyWidth, UINT diFlags) PURE
Draw an icon.
void SetMaskFilter(IMaskFilter *pMaskFilter) PURE
Sets the mask filter for anti-aliasing effects.
HRESULT MeasureText(LPCTSTR pszText, int cchLen, SIZE *psz) PURE
Measure the size of the text.
HRESULT ExcludeClipRect(LPCRECT pRc) PURE
Exclude a rectangle from the current clip region.