soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
IRenderTarget Struct Reference

Interface for rendering target objects. More...

#include <SRender-i.h>

Inheritance diagram for IRenderTarget:
IObjRef

Public Member Functions

long AddRef () PURE
 Increment the reference count.
 
long Release () PURE
 Decrement the reference count and destroy the object if the count reaches zero.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero.
 
void BeginDraw () PURE
 Start a drawing operation.
 
void EndDraw () PURE
 End a drawing operation.
 
BOOL IsOffscreen () SCONST PURE
 Check if the render target is offscreen.
 
HRESULT CreatePen (int iStyle, COLORREF cr, int cWidth, IPenS **ppPen) PURE
 Create a pen object.
 
HRESULT CreateSolidColorBrush (COLORREF cr, IBrushS **ppBrush) PURE
 Create a solid color brush.
 
HRESULT CreateBitmapBrush (IBitmapS *pBmp, TileMode xtm, TileMode ytm, IBrushS **ppBrush) PURE
 Create a bitmap brush.
 
HRESULT CreateGradientBrush (const GradientItem *pGradients, int nCount, const GradientInfo *info, BYTE byAlpha, TileMode tileMode, IBrushS **ppBrush) PURE
 Create a gradient brush.
 
HRESULT CreateRegion (IRegionS **ppRegion) PURE
 Create a region object.
 
HRESULT Resize (SIZE sz) PURE
 Resize the render target.
 
HRESULT OffsetViewportOrg (int xOff, int yOff, LPPOINT lpPoint=NULL) PURE
 Offset the viewport origin.
 
HRESULT GetViewportOrg (LPPOINT lpPoint) PURE
 Get the current viewport origin.
 
HRESULT SetViewportOrg (POINT pt) PURE
 Set the viewport origin.
 
HRESULT PushClipRect (LPCRECT pRect, UINT mode=RGN_AND) PURE
 Push a rectangular clip region.
 
HRESULT PushClipRegion (IRegionS *pRegion, UINT mode=RGN_AND) PURE
 Push a region-based clip.
 
HRESULT PopClip () PURE
 Pop the last clip region from the stack.
 
HRESULT ExcludeClipRect (LPCRECT pRc) PURE
 Exclude a rectangle from the current clip region.
 
HRESULT SaveClip (int *pnState) PURE
 Save the current clip state.
 
HRESULT RestoreClip (int nState=-1) PURE
 Restore a previously saved clip state.
 
HRESULT GetClipRegion (IRegionS **ppRegion) PURE
 Get the current clip region.
 
HRESULT GetClipBox (LPRECT prc) PURE
 Get the bounding box of the current clip region.
 
HRESULT DrawText (LPCTSTR pszText, int cchLen, LPRECT pRc, UINT uFormat) PURE
 Draw text within a rectangle.
 
HRESULT MeasureText (LPCTSTR pszText, int cchLen, SIZE *psz) PURE
 Measure the size of the text.
 
HRESULT TextOut (int x, int y, LPCTSTR lpszString, int nCount) PURE
 Output text at a specified position.
 
HRESULT DrawRectangle (LPCRECT pRect) PURE
 Draw a rectangle outline.
 
HRESULT FillRectangle (LPCRECT pRect) PURE
 Fill a rectangle with the current brush.
 
HRESULT FillSolidRect (LPCRECT pRect, COLORREF cr) PURE
 Fill a rectangle with a solid color.
 
HRESULT DrawRoundRect (LPCRECT pRect, POINT pt) PURE
 Draw a rounded rectangle outline.
 
HRESULT FillRoundRect (LPCRECT pRect, POINT pt) PURE
 Fill a rounded rectangle with the current brush.
 
HRESULT FillSolidRoundRect (LPCRECT pRect, POINT pt, COLORREF cr) PURE
 Fill a rounded rectangle with a solid color.
 
HRESULT ClearRect (LPCRECT pRect, COLORREF cr) PURE
 Clear a rectangle with a solid color.
 
HRESULT InvertRect (LPCRECT pRect) PURE
 Invert the colors in a rectangle.
 
HRESULT DrawEllipse (LPCRECT pRect) PURE
 Draw an ellipse outline.
 
HRESULT FillEllipse (LPCRECT pRect) PURE
 Fill an ellipse with the current brush.
 
HRESULT FillSolidEllipse (LPCRECT pRect, COLORREF cr) PURE
 Fill an ellipse with a solid color.
 
HRESULT DrawArc (LPCRECT pRect, float startAngle, float sweepAngle, BOOL useCenter) PURE
 Draw an arc.
 
HRESULT DrawArc2 (LPCRECT pRect, float startAngle, float sweepAngle, int width) PURE
 Draw an arc with a specified line width.
 
HRESULT FillArc (LPCRECT pRect, float startAngle, float sweepAngle) PURE
 Fill an arc.
 
HRESULT DrawLines (LPPOINT pPt, size_t nCount) PURE
 Draw a series of connected lines.
 
HRESULT DrawGradientRect (LPCRECT pRect, BOOL bVert, POINT ptRoundCorner, const GradientItem *pGradients, int nCount, BYTE byAlpha=0xFF) PURE
 Draw a gradient-filled rectangle.
 
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 DrawGradientPath (const IPathS *path, const GradientItem *pGradients, int nCount, const GradientInfo *info, BYTE byAlpha=0xFF) PURE
 Draw a gradient-filled path.
 
HRESULT DrawIconEx (int xLeft, int yTop, HICON hIcon, int cxWidth, int cyWidth, UINT diFlags) PURE
 Draw an icon.
 
HRESULT DrawBitmap (LPCRECT pRcDest, const IBitmapS *pBitmap, int xSrc, int ySrc, BYTE byAlpha=0xFF) PURE
 Draw a bitmap.
 
HRESULT DrawBitmapEx (LPCRECT pRcDest, const IBitmapS *pBitmap, LPCRECT pRcSrc, UINT expendMode, BYTE byAlpha=0xFF) PURE
 Draws a bitmap with expansion mode.
 
HRESULT DrawBitmap9Patch (LPCRECT pRcDest, const IBitmapS *pBitmap, LPCRECT pRcSrc, LPCRECT pRcSourMargin, UINT expendMode, BYTE byAlpha=0xFF) PURE
 Draws a 9-patch bitmap.
 
HRESULT BitBlt (LPCRECT pRcDest, IRenderTarget *pRTSour, int xSrc, int ySrc, DWORD dwRop=kSrcCopy) PURE
 Performs a bit-block transfer (BitBlt) operation.
 
HRESULT AlphaBlend (LPCRECT pRcDest, IRenderTarget *pRTSrc, LPCRECT pRcSrc, BYTE byAlpha) PURE
 Performs an alpha-blended transfer from one render target to another.
 
IRenderObjGetCurrentObject (OBJTYPE uType) PURE
 Retrieves the current rendering object of the specified type.
 
HRESULT SelectDefaultObject (OBJTYPE objType, IRenderObj **pOldObj=NULL) PURE
 Resets the specified rendering object to its default state.
 
HRESULT SelectObject (IRenderObj *pObj, IRenderObj **pOldObj=NULL) PURE
 Selects a new rendering object and optionally retrieves the previous one.
 
COLORREF GetTextColor () PURE
 Retrieves the current text color.
 
COLORREF SetTextColor (COLORREF color) PURE
 Sets the current text color.
 
void SetMaskFilter (IMaskFilter *pMaskFilter) PURE
 Sets the mask filter for anti-aliasing effects.
 
IMaskFilter * GetMaskFilter () PURE
 Retrieves the current mask filter.
 
HDC GetDC (UINT uFlag) PURE
 Retrieves a device context (DC) compatible with the render target.
 
void ReleaseDC (HDC hdc, LPCRECT pRc=NULL) PURE
 Releases a previously retrieved device context (DC).
 
HRESULT SetTransform (const float matrix[9], float oldMatrix[9]=NULL) PURE
 Sets the coordinate transformation matrix.
 
HRESULT GetTransform (float matrix[9]) SCONST PURE
 Retrieves the current coordinate transformation matrix.
 
COLORREF GetPixel (int x, int y) PURE
 Retrieves the color of a specific pixel.
 
COLORREF SetPixel (int x, int y, COLORREF cr) PURE
 Sets the color of a specific pixel.
 
HRESULT PushClipPath (const IPathS *path, UINT mode, BOOL doAntiAlias=FALSE) PURE
 Modifies the current clipping region using a path.
 
HRESULT DrawPath (const IPathS *path, IPathEffect *pathEffect=NULL) PURE
 Draws the outline of a path using the currently selected pen.
 
HRESULT FillPath (const IPathS *path) PURE
 Fills the interior of a path using the currently selected brush.
 
HRESULT SetXfermode (int mode, int *pOldMode=NULL) PURE
 Sets the transfer mode for drawing operations.
 
BOOL SetAntiAlias (BOOL bAntiAlias) PURE
 Enables or disables anti-aliasing for drawing operations.
 
BOOL GetAntiAlias () SCONST PURE
 Retrieves the current anti-aliasing state.
 
- Public Member Functions inherited from IObjRef
long AddRef () PURE
 Increases the reference count.
 
long Release () PURE
 Decreases the reference count.
 
void OnFinalRelease () PURE
 Called when the reference count reaches zero and the object is about to be released.
 

Detailed Description

Interface for rendering target objects.

This interface provides methods for drawing, clipping, transforming, and managing rendering resources such as pens, brushes, and bitmaps. It also supports advanced operations like anti-aliasing, blending, and path-based drawing.

Definition at line 1439 of file SRender-i.h.

Member Function Documentation

◆ AddRef()

long IRenderTarget::AddRef ( )

Increment the reference count.

Returns
New reference count.

◆ AlphaBlend()

HRESULT IRenderTarget::AlphaBlend ( LPCRECT pRcDest,
IRenderTarget * pRTSrc,
LPCRECT pRcSrc,
BYTE byAlpha )

Performs an alpha-blended transfer from one render target to another.

Parameters
pRcDestDestination rectangle for the alpha blend.
pRTSrcPointer to the source render target.
pRcSrcSource rectangle for the alpha blend.
byAlphaAlpha value for blending.
Returns
HRESULT indicating success or failure.

◆ BitBlt()

HRESULT IRenderTarget::BitBlt ( LPCRECT pRcDest,
IRenderTarget * pRTSour,
int xSrc,
int ySrc,
DWORD dwRop = kSrcCopy )

Performs a bit-block transfer (BitBlt) operation.

Parameters
pRcDestDestination rectangle for the BitBlt operation.
pRTSourPointer to the source render target.
xSrcX-coordinate of the source point.
ySrcY-coordinate of the source point.
dwRopRaster operation code (default is kSrcCopy).
Returns
HRESULT indicating success or failure.

◆ ClearRect()

HRESULT IRenderTarget::ClearRect ( LPCRECT pRect,
COLORREF cr )

Clear a rectangle with a solid color.

Parameters
pRectRectangle to clear.
crClear color.
Returns
HRESULT indicating success or failure.

◆ CreateBitmapBrush()

HRESULT IRenderTarget::CreateBitmapBrush ( IBitmapS * pBmp,
TileMode xtm,
TileMode ytm,
IBrushS ** ppBrush )

Create a bitmap brush.

Parameters
pBmpBitmap object.
xtmX-axis tile mode.
ytmY-axis tile mode.
ppBrushPointer to the created brush object.
Returns
HRESULT indicating success or failure.

◆ CreateGradientBrush()

HRESULT IRenderTarget::CreateGradientBrush ( const GradientItem * pGradients,
int nCount,
const GradientInfo * info,
BYTE byAlpha,
TileMode tileMode,
IBrushS ** ppBrush )

Create a gradient brush.

Parameters
pGradientsArray of gradient items.
nCountNumber of gradient items.
infoGradient information.
byAlphaAlpha value for the gradient.
tileModeTile mode for the gradient.
ppBrushPointer to the created brush object.
Returns
HRESULT indicating success or failure.

◆ CreatePen()

HRESULT IRenderTarget::CreatePen ( int iStyle,
COLORREF cr,
int cWidth,
IPenS ** ppPen )

Create a pen object.

Parameters
iStylePen style.
crPen color.
cWidthPen width.
ppPenPointer to the created pen object.
Returns
HRESULT indicating success or failure.

◆ CreateRegion()

HRESULT IRenderTarget::CreateRegion ( IRegionS ** ppRegion)

Create a region object.

Parameters
ppRegionPointer to the created region object.
Returns
HRESULT indicating success or failure.

◆ CreateSolidColorBrush()

HRESULT IRenderTarget::CreateSolidColorBrush ( COLORREF cr,
IBrushS ** ppBrush )

Create a solid color brush.

Parameters
crBrush color.
ppBrushPointer to the created brush object.
Returns
HRESULT indicating success or failure.

◆ DrawArc()

HRESULT IRenderTarget::DrawArc ( LPCRECT pRect,
float startAngle,
float sweepAngle,
BOOL useCenter )

Draw an arc.

Parameters
pRectRectangle defining the bounds of the arc.
startAngleStarting angle (in degrees) where the arc begins.
sweepAngleSweep angle (in degrees) measured clockwise.
useCenterWhether to use the center point.
Returns
HRESULT indicating success or failure.

◆ DrawArc2()

HRESULT IRenderTarget::DrawArc2 ( LPCRECT pRect,
float startAngle,
float sweepAngle,
int width )

Draw an arc with a specified line width.

Parameters
pRectRectangle defining the bounds of the arc.
startAngleStarting angle (in degrees) where the arc begins.
sweepAngleSweep angle (in degrees) measured clockwise.
widthLine width of the arc.
Returns
HRESULT indicating success or failure.

◆ DrawBitmap()

HRESULT IRenderTarget::DrawBitmap ( LPCRECT pRcDest,
const IBitmapS * pBitmap,
int xSrc,
int ySrc,
BYTE byAlpha = 0xFF )

Draw a bitmap.

Parameters
pRcDestDestination rectangle.
pBitmapBitmap object.
xSrcSource X position.
ySrcSource Y position.
byAlphaAlpha value for blending.
Returns
HRESULT indicating success or failure.

◆ DrawBitmap9Patch()

HRESULT IRenderTarget::DrawBitmap9Patch ( LPCRECT pRcDest,
const IBitmapS * pBitmap,
LPCRECT pRcSrc,
LPCRECT pRcSourMargin,
UINT expendMode,
BYTE byAlpha = 0xFF )

Draws a 9-patch bitmap.

Parameters
pRcDestDestination rectangle for the bitmap.
pBitmapPointer to the bitmap object to draw.
pRcSrcSource rectangle within the bitmap.
pRcSourMarginMargins for the 9-patch source.
expendModeExpansion mode (e.g., stretch, tile).
byAlphaOptional alpha value for blending (default is 0xFF).
Returns
HRESULT indicating success or failure.

◆ DrawBitmapEx()

HRESULT IRenderTarget::DrawBitmapEx ( LPCRECT pRcDest,
const IBitmapS * pBitmap,
LPCRECT pRcSrc,
UINT expendMode,
BYTE byAlpha = 0xFF )

Draws a bitmap with expansion mode.

Parameters
pRcDestDestination rectangle for the bitmap.
pBitmapPointer to the bitmap object to draw.
pRcSrcSource rectangle within the bitmap.
expendModeExpansion mode (e.g., stretch, tile).
byAlphaOptional alpha value for blending (default is 0xFF).
Returns
HRESULT indicating success or failure.

◆ DrawEllipse()

HRESULT IRenderTarget::DrawEllipse ( LPCRECT pRect)

Draw an ellipse outline.

Parameters
pRectRectangle defining the bounds of the ellipse.
Returns
HRESULT indicating success or failure.

◆ DrawGradientPath()

HRESULT IRenderTarget::DrawGradientPath ( const IPathS * path,
const GradientItem * pGradients,
int nCount,
const GradientInfo * info,
BYTE byAlpha = 0xFF )

Draw a gradient-filled path.

Parameters
pathPath object.
pGradientsArray of gradient items.
nCountNumber of gradient items.
infoGradient information.
byAlphaAlpha value for the gradient.
Returns
HRESULT indicating success or failure.

◆ DrawGradientRect()

HRESULT IRenderTarget::DrawGradientRect ( LPCRECT pRect,
BOOL bVert,
POINT ptRoundCorner,
const GradientItem * pGradients,
int nCount,
BYTE byAlpha = 0xFF )

Draw a gradient-filled rectangle.

Parameters
pRectRectangle to fill.
bVertVertical gradient flag.
ptRoundCornerX and Y radii for rounded corners.
pGradientsArray of gradient items.
nCountNumber of gradient items.
byAlphaAlpha value for the gradient.
Returns
HRESULT indicating success or failure.

◆ DrawGradientRectEx()

HRESULT IRenderTarget::DrawGradientRectEx ( LPCRECT pRect,
POINT ptRoundCorner,
const GradientItem * pGradients,
int nCount,
const GradientInfo * info,
BYTE byAlpha = 0xFF )

Draw an extended gradient-filled rectangle.

Parameters
pRectRectangle to fill.
ptRoundCornerX and Y radii for rounded corners.
pGradientsArray of gradient items.
nCountNumber of gradient items.
infoGradient information.
byAlphaAlpha value for the gradient.
Returns
HRESULT indicating success or failure.

◆ DrawIconEx()

HRESULT IRenderTarget::DrawIconEx ( int xLeft,
int yTop,
HICON hIcon,
int cxWidth,
int cyWidth,
UINT diFlags )

Draw an icon.

Parameters
xLeftLeft position of the icon.
yTopTop position of the icon.
hIconIcon handle.
cxWidthWidth of the icon.
cyWidthHeight of the icon.
diFlagsDrawing flags.
Returns
HRESULT indicating success or failure.

◆ DrawLines()

HRESULT IRenderTarget::DrawLines ( LPPOINT pPt,
size_t nCount )

Draw a series of connected lines.

Parameters
pPtArray of points defining the lines.
nCountNumber of points.
Returns
HRESULT indicating success or failure.

◆ DrawPath()

HRESULT IRenderTarget::DrawPath ( const IPathS * path,
IPathEffect * pathEffect = NULL )

Draws the outline of a path using the currently selected pen.

Parameters
pathPointer to the path object to draw.
pathEffectOptional pointer to a path effect object (default is NULL).
Returns
HRESULT indicating success or failure.

◆ DrawRectangle()

HRESULT IRenderTarget::DrawRectangle ( LPCRECT pRect)

Draw a rectangle outline.

Parameters
pRectRectangle to draw.
Returns
HRESULT indicating success or failure.

◆ DrawRoundRect()

HRESULT IRenderTarget::DrawRoundRect ( LPCRECT pRect,
POINT pt )

Draw a rounded rectangle outline.

Parameters
pRectRectangle defining the bounds of the rounded rectangle.
ptX and Y radii for the rounded corners.
Returns
HRESULT indicating success or failure.

◆ DrawText()

HRESULT IRenderTarget::DrawText ( LPCTSTR pszText,
int cchLen,
LPRECT pRc,
UINT uFormat )

Draw text within a rectangle.

Parameters
pszTextText to draw.
cchLenLength of the text.
pRcRectangle defining the drawing area.
uFormatText formatting options.
Returns
HRESULT indicating success or failure.

◆ ExcludeClipRect()

HRESULT IRenderTarget::ExcludeClipRect ( LPCRECT pRc)

Exclude a rectangle from the current clip region.

Parameters
pRcRectangle to exclude.
Returns
HRESULT indicating success or failure.

◆ FillArc()

HRESULT IRenderTarget::FillArc ( LPCRECT pRect,
float startAngle,
float sweepAngle )

Fill an arc.

Parameters
pRectRectangle defining the bounds of the arc.
startAngleStarting angle (in degrees) where the arc begins.
sweepAngleSweep angle (in degrees) measured clockwise.
Returns
HRESULT indicating success or failure.

◆ FillEllipse()

HRESULT IRenderTarget::FillEllipse ( LPCRECT pRect)

Fill an ellipse with the current brush.

Parameters
pRectRectangle defining the bounds of the ellipse.
Returns
HRESULT indicating success or failure.

◆ FillPath()

HRESULT IRenderTarget::FillPath ( const IPathS * path)

Fills the interior of a path using the currently selected brush.

Parameters
pathPointer to the path object to fill.
Returns
HRESULT indicating success or failure.

◆ FillRectangle()

HRESULT IRenderTarget::FillRectangle ( LPCRECT pRect)

Fill a rectangle with the current brush.

Parameters
pRectRectangle to fill.
Returns
HRESULT indicating success or failure.

◆ FillRoundRect()

HRESULT IRenderTarget::FillRoundRect ( LPCRECT pRect,
POINT pt )

Fill a rounded rectangle with the current brush.

Parameters
pRectRectangle defining the bounds of the rounded rectangle.
ptX and Y radii for the rounded corners.
Returns
HRESULT indicating success or failure.

◆ FillSolidEllipse()

HRESULT IRenderTarget::FillSolidEllipse ( LPCRECT pRect,
COLORREF cr )

Fill an ellipse with a solid color.

Parameters
pRectRectangle defining the bounds of the ellipse.
crSolid color.
Returns
HRESULT indicating success or failure.

◆ FillSolidRect()

HRESULT IRenderTarget::FillSolidRect ( LPCRECT pRect,
COLORREF cr )

Fill a rectangle with a solid color.

Parameters
pRectRectangle to fill.
crSolid color.
Returns
HRESULT indicating success or failure.

◆ FillSolidRoundRect()

HRESULT IRenderTarget::FillSolidRoundRect ( LPCRECT pRect,
POINT pt,
COLORREF cr )

Fill a rounded rectangle with a solid color.

Parameters
pRectRectangle defining the bounds of the rounded rectangle.
ptX and Y radii for the rounded corners.
crSolid color.
Returns
HRESULT indicating success or failure.

◆ GetAntiAlias()

BOOL IRenderTarget::GetAntiAlias ( )

Retrieves the current anti-aliasing state.

Returns
BOOL indicating whether anti-aliasing is enabled.

◆ GetClipBox()

HRESULT IRenderTarget::GetClipBox ( LPRECT prc)

Get the bounding box of the current clip region.

Parameters
prcPointer to receive the bounding box rectangle.
Returns
HRESULT indicating success or failure.

◆ GetClipRegion()

HRESULT IRenderTarget::GetClipRegion ( IRegionS ** ppRegion)

Get the current clip region.

Parameters
ppRegionPointer to receive the clip region object.
Returns
HRESULT indicating success or failure.

◆ GetCurrentObject()

IRenderObj * IRenderTarget::GetCurrentObject ( OBJTYPE uType)

Retrieves the current rendering object of the specified type.

Parameters
uTypeType of the rendering object (e.g., pen, brush).
Returns
Pointer to the current rendering object.

◆ GetDC()

HDC IRenderTarget::GetDC ( UINT uFlag)

Retrieves a device context (DC) compatible with the render target.

Parameters
uFlagFlags for DC retrieval.
Returns
Handle to the device context (HDC).

◆ GetMaskFilter()

IMaskFilter * IRenderTarget::GetMaskFilter ( )

Retrieves the current mask filter.

Returns
Pointer to the current mask filter object.

◆ GetPixel()

COLORREF IRenderTarget::GetPixel ( int x,
int y )

Retrieves the color of a specific pixel.

Parameters
xX-coordinate of the pixel.
yY-coordinate of the pixel.
Returns
COLORREF representing the color of the pixel.

◆ GetTextColor()

COLORREF IRenderTarget::GetTextColor ( )

Retrieves the current text color.

Returns
COLORREF representing the current text color.

◆ GetTransform()

HRESULT IRenderTarget::GetTransform ( float matrix[9])

Retrieves the current coordinate transformation matrix.

Parameters
matrixArray of 9 floats to store the current 2x3 transformation matrix.
Returns
HRESULT indicating success or failure.

◆ GetViewportOrg()

HRESULT IRenderTarget::GetViewportOrg ( LPPOINT lpPoint)

Get the current viewport origin.

Parameters
lpPointPointer to receive the viewport origin.
Returns
HRESULT indicating success or failure.

◆ InvertRect()

HRESULT IRenderTarget::InvertRect ( LPCRECT pRect)

Invert the colors in a rectangle.

Parameters
pRectRectangle to invert.
Returns
HRESULT indicating success or failure.

◆ IsOffscreen()

BOOL IRenderTarget::IsOffscreen ( )

Check if the render target is offscreen.

Returns
TRUE if offscreen, FALSE otherwise.

◆ MeasureText()

HRESULT IRenderTarget::MeasureText ( LPCTSTR pszText,
int cchLen,
SIZE * psz )

Measure the size of the text.

Parameters
pszTextText to measure.
cchLenLength of the text.
pszPointer to receive the measured size.
Returns
HRESULT indicating success or failure.

◆ OffsetViewportOrg()

HRESULT IRenderTarget::OffsetViewportOrg ( int xOff,
int yOff,
LPPOINT lpPoint = NULL )

Offset the viewport origin.

Parameters
xOffOffset in the X direction.
yOffOffset in the Y direction.
lpPointOptional pointer to receive the previous viewport origin.
Returns
HRESULT indicating success or failure.

◆ PopClip()

HRESULT IRenderTarget::PopClip ( )

Pop the last clip region from the stack.

Returns
HRESULT indicating success or failure.

◆ PushClipPath()

HRESULT IRenderTarget::PushClipPath ( const IPathS * path,
UINT mode,
BOOL doAntiAlias = FALSE )

Modifies the current clipping region using a path.

Parameters
pathPointer to the path object to combine with the current clip.
modeRegion operation mode (e.g., RGN_AND, RGN_OR).
doAntiAliasBoolean indicating whether anti-aliasing should be applied (default is FALSE).
Returns
HRESULT indicating success or failure.

◆ PushClipRect()

HRESULT IRenderTarget::PushClipRect ( LPCRECT pRect,
UINT mode = RGN_AND )

Push a rectangular clip region.

Parameters
pRectRectangle defining the clip region.
modeRegion operation mode.
Returns
HRESULT indicating success or failure.

◆ PushClipRegion()

HRESULT IRenderTarget::PushClipRegion ( IRegionS * pRegion,
UINT mode = RGN_AND )

Push a region-based clip.

Parameters
pRegionRegion object.
modeRegion operation mode.
Returns
HRESULT indicating success or failure.

◆ Release()

long IRenderTarget::Release ( )

Decrement the reference count and destroy the object if the count reaches zero.

Returns
New reference count.

◆ ReleaseDC()

void IRenderTarget::ReleaseDC ( HDC hdc,
LPCRECT pRc = NULL )

Releases a previously retrieved device context (DC).

Parameters
hdcHandle to the device context to release.
pRcOptional pointer to a rectangle defining the area to update (default is NULL).

◆ Resize()

HRESULT IRenderTarget::Resize ( SIZE sz)

Resize the render target.

Parameters
szNew size.
Returns
HRESULT indicating success or failure.

◆ RestoreClip()

HRESULT IRenderTarget::RestoreClip ( int nState = -1)

Restore a previously saved clip state.

Parameters
nStateClip state identifier. If -1, restores the last saved state.
Returns
HRESULT indicating success or failure.

◆ SaveClip()

HRESULT IRenderTarget::SaveClip ( int * pnState)

Save the current clip state.

Parameters
pnStatePointer to receive the clip state identifier.
Returns
HRESULT indicating success or failure.

◆ SelectDefaultObject()

HRESULT IRenderTarget::SelectDefaultObject ( OBJTYPE objType,
IRenderObj ** pOldObj = NULL )

Resets the specified rendering object to its default state.

Parameters
objTypeType of the rendering object to reset.
pOldObjOptional pointer to receive the previous object (default is NULL).
Returns
HRESULT indicating success or failure.

◆ SelectObject()

HRESULT IRenderTarget::SelectObject ( IRenderObj * pObj,
IRenderObj ** pOldObj = NULL )

Selects a new rendering object and optionally retrieves the previous one.

Parameters
pObjPointer to the new rendering object.
pOldObjOptional pointer to receive the previous object (default is NULL).
Returns
HRESULT indicating success or failure.

◆ SetAntiAlias()

BOOL IRenderTarget::SetAntiAlias ( BOOL bAntiAlias)

Enables or disables anti-aliasing for drawing operations.

Parameters
bAntiAliasBoolean indicating whether anti-aliasing should be enabled.
Returns
BOOL indicating the previous anti-aliasing state.

◆ SetMaskFilter()

void IRenderTarget::SetMaskFilter ( IMaskFilter * pMaskFilter)

Sets the mask filter for anti-aliasing effects.

Parameters
pMaskFilterPointer to the mask filter object.

◆ SetPixel()

COLORREF IRenderTarget::SetPixel ( int x,
int y,
COLORREF cr )

Sets the color of a specific pixel.

Parameters
xX-coordinate of the pixel.
yY-coordinate of the pixel.
crNew color for the pixel.
Returns
COLORREF representing the previous color of the pixel.

◆ SetTextColor()

COLORREF IRenderTarget::SetTextColor ( COLORREF color)

Sets the current text color.

Parameters
colorNew text color.
Returns
COLORREF representing the previous text color.

◆ SetTransform()

HRESULT IRenderTarget::SetTransform ( const float matrix[9],
float oldMatrix[9] = NULL )

Sets the coordinate transformation matrix.

Parameters
matrixArray of 9 floats representing the new 3x3 transformation matrix.
oldMatrixOptional array of 9 floats to store the previous transformation matrix (default is NULL).
Returns
HRESULT indicating success or failure.

◆ SetViewportOrg()

HRESULT IRenderTarget::SetViewportOrg ( POINT pt)

Set the viewport origin.

Parameters
ptNew viewport origin.
Returns
HRESULT indicating success or failure.

◆ SetXfermode()

HRESULT IRenderTarget::SetXfermode ( int mode,
int * pOldMode = NULL )

Sets the transfer mode for drawing operations.

Parameters
modeNew transfer mode.
pOldModeOptional pointer to store the previous transfer mode (default is NULL).
Returns
HRESULT indicating success or failure.

◆ TextOut()

HRESULT IRenderTarget::TextOut ( int x,
int y,
LPCTSTR lpszString,
int nCount )

Output text at a specified position.

Parameters
xX-coordinate of the text position.
yY-coordinate of the text position.
lpszStringText to output.
nCountNumber of characters to output.
Returns
HRESULT indicating success or failure.

The documentation for this struct was generated from the following file: