PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
graphics.h File Reference

Graphics API. More...

#include <stddef.h>
#include <stdint.h>
#include <pdfsdk/core/api_macro.h>
#include <pdfsdk/errors.h>
#include <pdfsdk/math_types.h>

Go to the source code of this file.

Classes

struct  GXColor
 
struct  GXLockedData
 
struct  GXLayerParams
 
struct  GXDashPattern
 
struct  GXStrokeParams
 
struct  GXBitmapAttrs
 
struct  GXGradientStop
 
struct  GXLinearGradientAttrs
 
struct  GXRadialGradientAttrs
 
struct  GXMeshVertex
 
struct  GXBitmapBrushAttrs
 

Macros

#define GXColorValueGetA(argb)
 
#define GXColorValueGetR(argb)
 
#define GXColorValueGetG(argb)
 
#define GXColorValueGetB(argb)
 

Typedefs

typedef uint32_t GXColorValue
 
typedef PDErrCode(PDFSDK_CALLCONV * GXRegionRectEnumProc) (void *userdata, const PDRectI *rect)
 
typedef unsigned int GXCacheEntryID
 
typedef void * GXObject
 
typedef struct GXBitmapRec_ * GXBitmap
 
typedef struct GXBrushRec_ * GXBrush
 
typedef struct GXFontFaceRec_ * GXFontFace
 
typedef struct GXGeometryRec_ * GXGeometry
 
typedef struct GXGradientRec_ * GXGradient
 
typedef struct GXPaletteRec_ * GXPalette
 
typedef struct GXRegionRec_ * GXRegion
 
typedef struct GXRenderTargetRec_ * GXRenderTarget
 
typedef struct GXHwContextRec_ * GXHwContext
 

Enumerations

enum  GXRuntimeMode { kGXRuntimeModeHardware , kGXRuntimeModeSoftware , kGXRuntimeModePrint }
 Defines the runtime modes for the Graphics application. More...
 
enum  GXPixelFormat {
  kGXPixelFormatUnknown = -1 , kGXPixelFormatRGB8 , kGXPixelFormatARGB8p , kGXPixelFormatARGB8 ,
  kGXPixelFormatXRGB8 , kGXPixelFormatA8 , kGXPixelFormatP8 , kGXPixelFormatL8 ,
  kGXPixelFormatA1 , kGXPixelFormatP1 , kGXPixelFormatL1
}
 Defines the pixel format of the graphics application. More...
 
enum  GXLockMode { kGXLockModeRead = 0x01 , kGXLockModeWrite = 0x02 , kGXLockModeReadWrite = kGXLockModeRead | kGXLockModeWrite }
 Defines the level of access and control over the graphics content. More...
 
enum  GXInterpolationMode { kGXInterpolationModeNearestNeighbor , kGXInterpolationModeLinear , kGXInterpolationModeAreaAverage }
 Defines the way through which pixel values are estimated or interpolated. More...
 
enum  GXFillRule { kGXFillRuleNonZero , kGXFillRuleEvenOdd }
 Determines how a path (a series or points that define a shape) is filled with color. More...
 
enum  GXBlendMode {
  kGXBlendModeNormal , kGXBlendModeMultiply , kGXBlendModeScreen , kGXBlendModeOverlay ,
  kGXBlendModeDarken , kGXBlendModeLighten , kGXBlendModeColorBurn , kGXBlendModeColorDodge ,
  kGXBlendModeHardLight , kGXBlendModeSoftLight , kGXBlendModeDifference , kGXBlendModeExclusion ,
  kGXBlendModeHue , kGXBlendModeSaturation , kGXBlendModeColor , kGXBlendModeLuminosity
}
 Determines the way in which colors of overlapping objects are combined. More...
 
enum  GXMaskMode { kGXMaskModeAlpha , kGXMaskModeInverseAlpha , kGXMaskModeLuminosity , kGXMaskModeInverseLuminosity }
 Determines the type of mask used to control which parts of an image or graphical element are visible or affected by operations. More...
 
enum  GXCombineMode {
  kGXCombineModeIntersect , kGXCombineModeUnion , kGXCombineModeDifference , kGXCombineModeExclude ,
  kGXCombineModeComplement
}
 Determines how the areas of different graphics interact with each other. More...
 
enum  GXLineCap { kGXLineCapFlat , kGXLineCapRound , kGXLineCapSquare }
 Determines the style used to finish the ends of lines in a graphics context. More...
 
enum  GXLineJoin { kGXLineJoinMiter , kGXLineJoinRound , kGXLineJoinBevel }
 Determines the shape that is used to connect the endpoints of two line segments that meet at a corner or vertex. More...
 
enum  { kGXDashPatternMaxSize = 15 }
 Defines the maximum size of a dashed pattern. More...
 
enum  GXExtendMode { kGXExtendModeClamp , kGXExtendModeWrap , kGXExtendModeMirror }
 Defines the way embedded images or patterns within a PDF file are handled. More...
 
enum  GXFontStyle { kGXFontStyleRegular , kGXFontStyleItalic , kGXFontStyleBold , kGXFontStyleBoldItalic }
 Defines the various styles that can be applied to text within a PDF document. More...
 

Functions

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXEnableHWAccelerationForThread ()
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXObjectAcquire (GXObject object)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXObjectRelease (GXObject object)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreatePalette (const GXColorValue *colors, size_t num_colors, GXPalette *ppalette)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXPaletteGetNumColors (GXPalette palette, size_t *pnum_colors)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXPaletteGetColor (GXPalette palette, size_t index, GXColorValue *pcolor)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXPaletteGetColors (GXPalette palette, const GXColorValue **pcolors)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmap (const GXBitmapAttrs *attrs, GXBitmap *pbitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromFile (const wchar_t *filename, GXBitmap *pbitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromFileFrame (const wchar_t *filename, uint32_t frame_index, uint32_t *ptotal_frames, GXBitmap *pbitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromMemory (void const *data, size_t size, GXBitmap *pbitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromMemoryFrame (const void *data, size_t size, uint32_t frame_index, uint32_t *ptotal_frames, GXBitmap *pbitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSaveToFile (GXBitmap bitmap, const wchar_t *filename)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetPixelFormat (GXBitmap bitmap, GXPixelFormat *pformat)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetSize (GXBitmap bitmap, PDSizeI *psize)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetDpiX (GXBitmap bitmap, float *pdpix)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetDpiY (GXBitmap bitmap, float *pdpiy)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSetPalette (GXBitmap bitmap, GXPalette palette)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetPalette (GXBitmap bitmap, GXPalette *ppalette)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapLock (GXBitmap bitmap, const PDRectI *rect, GXLockMode, GXLockedData *)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapUnlock (GXBitmap bitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCopyFromBitmap (GXBitmap bitmap, const PDPointI *dest_point, GXBitmap source, const PDRectI *source_rect)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCopyFromMemory (GXBitmap bitmap, const PDRectI *dest_rect, const GXLockedData *data)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCopyToMemory (GXBitmap bitmap, const PDRectI *source_rect, const GXLockedData *data)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapColorFill (GXBitmap bitmap, const PDRectI *rect, GXColorValue color)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapNotifyChanged (GXBitmap bitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSetOffscreenPainting (GXBitmap bitmap, bool offscreen)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheSetMemoryQuota (size_t quota)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheGetMemoryQuota (size_t *pquota)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheGetMemoryInUse (size_t *pinuse)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCachePut (GXBitmap bitmap, GXCacheEntryID *pid)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheGet (GXCacheEntryID id, GXBitmap *pbitmap)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheRemove (GXCacheEntryID id)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientLinear (const GXLinearGradientAttrs *attrs, GXGradient *pgradient)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientRadial (const GXRadialGradientAttrs *attrs, GXGradient *pgradient)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientTriMesh (const GXMeshVertex *vertices, size_t num_vertices, GXColorValue bgcolor, GXGradient *pgradient)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushSolid (const GXColor *color, GXBrush *pbrush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushSolidARGB (GXColorValue argb, GXBrush *pbrush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushBitmap (GXBitmap bitmap, float opacity, const GXBitmapBrushAttrs *attrs, const PDMatrix *xform, GXBrush *pbrush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushGradient (GXGradient gradient, float opacity, const PDMatrix *xform, GXBrush *pbrush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateSystemFontFace (const wchar_t *family, GXFontStyle style, GXFontFace *pfontface)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateFontFaceFromFile (const wchar_t *filename, uint32_t faceindex, uint32_t *ptotalfaces, GXFontFace *pfontface)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateFontFaceFromMemory (const void *data, size_t size, bool copyData, uint32_t faceindex, uint32_t *ptotalfaces, GXFontFace *pfontface)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXFontFaceCalculateTextBound (GXFontFace font, float fontSize, const wchar_t *text, PDSizeF *pbound)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGeometry (GXGeometry *pgeom)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometrySetFillRule (GXGeometry geom, GXFillRule fillrule)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFillRule (GXGeometry geom, GXFillRule *pfillrule)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEmpty (GXGeometry geom, bool *pempty)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryPointsEqual (GXGeometry geomA, GXGeometry geomB, bool *pequal)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetCurrentPoint (GXGeometry geom, PDPointF *ppoint)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetBound (GXGeometry geom, const PDMatrix *xform, PDRectF *pbound)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryBeginFigure (GXGeometry geom, const PDPointF *point)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEndFigure (GXGeometry geom)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEndFigureClose (GXGeometry geom)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryLineTo (GXGeometry geom, const PDPointF *to)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryConicCurveTo (GXGeometry geom, const PDPointF *c, const PDPointF *to)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryCubicCurveTo (GXGeometry geom, const PDPointF *c0, const PDPointF *c1, const PDPointF *to)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryRectangle (GXGeometry geom, const PDRectF *rect)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEllipse (GXGeometry geom, const PDRectF *bound)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryRoundRectangle (GXGeometry geom, const PDRectF *rect, float xradii, float yradii)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryCopy (GXGeometry geom, GXGeometry *pcopy)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryTransform (GXGeometry geom, const PDMatrix *xform, GXGeometry *presult)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryWiden (GXGeometry geom, float width, const GXStrokeParams *params, float flatness, GXGeometry *presult)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryCombine (GXGeometry geomA, GXGeometry geomB, const PDMatrix *xform, GXCombineMode mode, float flatness, GXGeometry *presult)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryHitTest (GXGeometry geom, const PDPointF *point, bool *phit)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometrySimplify (GXGeometry geom, float flatness, GXGeometry *presult)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryIsRectangle (GXGeometry geom, const PDMatrix *xform, bool *pisrectangle, PDRectF *prectangle)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetNumFigures (GXGeometry geom, size_t *pnumfigures)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigureNumSegments (GXGeometry geom, size_t figureindex, size_t *pnumsegs)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigureNumPoints (GXGeometry geom, size_t figureindex, size_t *pnumpoints)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigurePointsPtr (GXGeometry geom, size_t figureindex, const PDPointF **ppoints)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryIsFigureSegmentCurve (GXGeometry geom, size_t figureindex, size_t segindex, bool *iscurve)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigureSegmentPointsIndex (GXGeometry geom, size_t figureindex, size_t segindex, size_t *ppointsindex)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryIsFigureClosed (GXGeometry geom, size_t figureindex, bool *pisclosed)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRegion (GXRegion *pregion)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRegionFromRect (const PDRectI *rect, GXRegion *pregion)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionIsAreaEmpty (GXRegion region, bool *pempty)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionGetBound (GXRegion region, PDRectI *pbound)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionContainsPoint (GXRegion region, const PDPointI *point, bool *pcontains)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionContainsRect (GXRegion region, const PDRectI *rect, bool *pcontains)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionContains (GXRegion region, GXRegion that_region, bool *pcontains)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionHasIntersection (GXRegion region, GXRegion that_region, bool *pisects)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionHasIntersectionWithRect (GXRegion region, const PDRectI *rect, bool *pisects)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionOffset (GXRegion region, int x, int y)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionCombine (GXRegion region, GXRegion that_region, GXCombineMode mode, GXRegion *presult)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionCombineRect (GXRegion region, const PDRectI *rect, GXCombineMode mode, GXRegion *presult)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionEnumRects (GXRegion region, GXRegionRectEnumProc proc, void *userdata)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetBitmap (GXBitmap bitmap, GXRenderTarget *ptarget)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetExtBuf (void *pixels, int stride, const GXBitmapAttrs *attrs, GXRenderTarget *ptarget)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetPixelFormat (GXRenderTarget target, GXPixelFormat *pformat)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetSize (GXRenderTarget target, PDSizeI *psize)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClear (GXRenderTarget target, GXColorValue clear_color)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetBeginPaint (GXRenderTarget target)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetEndPaint (GXRenderTarget target)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetPushState (GXRenderTarget target)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetPopState (GXRenderTarget target)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetCTM (GXRenderTarget target, PDMatrix *pctm)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetCTM (GXRenderTarget target, const PDMatrix *ctm)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetConcatCTM (GXRenderTarget target, const PDMatrix *xform)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetRotateCTM (GXRenderTarget target, float radians)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetScaleCTM (GXRenderTarget target, float sx, float sy)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetTranslateCTM (GXRenderTarget target, float dx, float dy)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetBlendMode (GXRenderTarget target, GXBlendMode mode)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetStrokeAdjustment (GXRenderTarget target, bool adjust)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetStrokeAdjustment (GXRenderTarget target, bool *padjust)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetOpacityMask (GXRenderTarget target, GXMaskMode mode, GXBrush mask)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetShapeMask (GXRenderTarget target, GXMaskMode mode, GXBrush mask)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetBeginLayer (GXRenderTarget target, const GXLayerParams *params)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetEndLayer (GXRenderTarget target)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillGeometry (GXRenderTarget target, GXGeometry geom, GXBrush brush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillTextGeometry (GXRenderTarget target, GXGeometry geom, GXBrush brush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillRect (GXRenderTarget target, const PDRectF *rect, GXBrush brush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillEllipse (GXRenderTarget target, const PDRectF *bound, GXBrush brush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeGeometry (GXRenderTarget target, GXGeometry geom, GXBrush brush, float width, const GXStrokeParams *params)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeLine (GXRenderTarget target, const PDPointF *start, const PDPointF *end, GXBrush brush, float width, const GXStrokeParams *params)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeRect (GXRenderTarget target, const PDRectF *rect, GXBrush brush, float width, const GXStrokeParams *params)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeEllipse (GXRenderTarget target, const PDRectF *bound, GXBrush brush, float width, const GXStrokeParams *params)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClipGeometry (GXRenderTarget target, GXGeometry geom)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClipRect (GXRenderTarget target, const PDRectF *rect)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClipEllipse (GXRenderTarget target, const PDRectF *bound)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetDrawBitmap (GXRenderTarget target, GXBitmap bitmap, float opacity, GXInterpolationMode imode)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStretchBitmap (GXRenderTarget target, GXBitmap bitmap, const PDRectF *target_rect, float opacity, GXInterpolationMode imode)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetDrawGradient (GXRenderTarget target, GXGradient gradient, float opacity)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillMask (GXRenderTarget target, GXBitmap mask, GXBrush brush, GXInterpolationMode imode)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetInvertRect (GXRenderTarget target, const PDRectF *rect)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetInvertLine (GXRenderTarget target, const PDPointI *start, const PDPointI *end)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillText (GXRenderTarget target, GXFontFace font, float fontSize, const wchar_t *text, GXBrush brush)
 
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetDrawBounds (GXRenderTarget target, PDRectI *pbounds)
 

Detailed Description

Graphics API.

Macro Definition Documentation

◆ GXColorValueGetA

#define GXColorValueGetA ( argb)
Value:
(static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 24) & 0xFF) / 255.f)

◆ GXColorValueGetB

#define GXColorValueGetB ( argb)
Value:
(static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 0) & 0xFF) / 255.f)

◆ GXColorValueGetG

#define GXColorValueGetG ( argb)
Value:
(static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 8) & 0xFF) / 255.f)

◆ GXColorValueGetR

#define GXColorValueGetR ( argb)
Value:
(static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 16) & 0xFF) / 255.f)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Defines the maximum size of a dashed pattern.

For more information you can refer to section 8.4.3.6 Line Dash Pattern of the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

◆ GXBlendMode

Determines the way in which colors of overlapping objects are combined.

This enumeration specifies how the colors of the foreground (source) and background (destination) pixels are blended together to produce the final image. The different blend modes achieve various visual effects, from simple transparency to complex color manipulations. For more information refer to section 11.3.5 Blend mode of the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

Enumerator
kGXBlendModeNormal 

Colors of the top layer simply replace the colors of the bottom layer, considering opacity.

kGXBlendModeMultiply 

Darkens the background color by multiplying the background and foreground color values. This often produces in a darker result.

kGXBlendModeScreen 

Lightens the background color by inverting, multiplying, and then inverting the result again. This often produces a brighter image.

kGXBlendModeOverlay 

A combination of Multiply and Screen. It multiplies dark areas and screens light areas. This blend mode enhances contrast.

kGXBlendModeDarken 

Selects the darker of the background and foreground colors.

kGXBlendModeLighten 

Selects the lighter of the background and foreground colors.

kGXBlendModeColorBurn 

Darkens the background color to reflect the foreground color by increasing the contrast.

kGXBlendModeColorDodge 

Brightens the background color to reflect the foreground color by decreasing the contrast.

kGXBlendModeHardLight 

Combines Multiply and Screen by using the foreground color to screen or multiply the background, depending on the foreground color.

kGXBlendModeSoftLight 

Subtler effect similar to Overlay, but it darkens or lightens the colors depending on the foreground color.

kGXBlendModeDifference 

Subtracts the darker of the two colors from the lighter one, which can create an inverted effect.

kGXBlendModeExclusion 

Similar to Difference but with lower contrast, creating a softer effect.

kGXBlendModeHue 

Changes the hue (color) of the base pixels to match the hue of the blend pixels while keeping the original lightness and saturation.

kGXBlendModeSaturation 

Changes the saturation of the base pixels to match the saturation of the blend pixels while keeping the original hue and lightness.

kGXBlendModeColor 

Combines the hue and saturation of the blend pixels with the luminance (brightness) of the base pixels. This effectively changes the color of the base pixels while maintaining their original lightness.

kGXBlendModeLuminosity 

Changes the lightness of the base pixels to match the lightness of the blend pixels while keeping the original hue and saturation.

◆ GXCombineMode

Determines how the areas of different graphics interact with each other.

This enumeration specifies the mode used to combine or manipulate multiple graphical elements within a PDF document.

Enumerator
kGXCombineModeIntersect 

Only the overlapping areas of the graphics are kept. Non-overlapping parts are discarded.

kGXCombineModeUnion 

Combines all areas of the graphics, including overlaps. The result is a single merged graphic.

kGXCombineModeDifference 

Keeps the areas of the first graphic and subtracts the overlapping areas of the second graphic.

kGXCombineModeExclude 

Keeps the areas of the first graphic and excludes the overlapping areas of the second graphic.

kGXCombineModeComplement 

Combines the areas of both graphics, but inverts the overlapping areas.

◆ GXExtendMode

Defines the way embedded images or patterns within a PDF file are handled.

This enumeration specifies the addressing modes for the handling of texture coordinates and patterns.

Enumerator
kGXExtendModeClamp 

The texture or pattern is stretched to fill the space, and the edges are extended to the boundary without repeating.

kGXExtendModeWrap 

The texture or pattern repeats itself horizontally and vertically to fill the space.

kGXExtendModeMirror 

The texture or pattern repeats itself, but each repetition is mirrored, thereby creating a reflection effect.

◆ GXFillRule

enum GXFillRule

Determines how a path (a series or points that define a shape) is filled with color.

This enumeration specifies how the intersecting areas within a path are combined when filling the path with color. Both rules determine if a point is inside or outside a path. For more information refer to section 8.5.3.3 Filling of the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

Enumerator
kGXFillRuleNonZero 

Draws a ray from a point to infinity in any direction and tallies the number of times the path crosses the ray. Starting from 0 the rule adds 1 each time the path segment crosses the ray from left to right. It subtracts 1 for right to left crossing. If the result is 0, the point is inside, otherwise it is outside.

kGXFillRuleEvenOdd 

Draws a ray from a point in any direction and counts the number of path segments that cross the ray. If the number is odd, the point is inside the path. If the number is even, the point is outside the path.

◆ GXFontStyle

Defines the various styles that can be applied to text within a PDF document.

This enumeration specifies how the text is rendered.

Enumerator
kGXFontStyleRegular 

The standard weight and style of the typeface. Default style without any added emphasis.

kGXFontStyleItalic 

A slanted version of the typeface, typically used to convey emphasis or distinction.

kGXFontStyleBold 

A heavier weight version of the typeface, making the text thicker and darker.

kGXFontStyleBoldItalic 

A combination of both bold and italic styles, making the text both heavier and slanted.

◆ GXInterpolationMode

Defines the way through which pixel values are estimated or interpolated.

This enumeration describes the method used to obtain a pixel value when resizing images.

Enumerator
kGXInterpolationModeNearestNeighbor 

Assigns the value of the closest pixel to the new pixel.

kGXInterpolationModeLinear 

Takes a weighted average of the four nearest pixels.

kGXInterpolationModeAreaAverage 

Averages the values of all pixels within the area of the new pixel.

◆ GXLineCap

enum GXLineCap

Determines the style used to finish the ends of lines in a graphics context.

This enumeration specifies how the endpoints of lines and strokes are rendered. Specifically the shape that shall be used at both ends of open sub-paths and dashes when they are stroked. For more information you can refer to section 8.4.3.3. Line Cap Style and 8.5.3.2 Stroking of the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

Enumerator
kGXLineCapFlat 

The line ends are squared off at the endpoint of the path. There is no projection beyond the end of the path. It is also known as Butt Cap.

kGXLineCapRound 

A semicircular arc with a diameter equal to the line width is drawn around the endpoint and filled in.

kGXLineCapSquare 

The stroke continues beyond the endpoint of the path for a distance equal to half the line width and is squared off. It is also known as Projecting Square Cap.

◆ GXLineJoin

enum GXLineJoin

Determines the shape that is used to connect the endpoints of two line segments that meet at a corner or vertex.

This enumeration specifies how the junction between the two lines appears. For more information you can refer to section 8.4.3.4 Line Join Style of the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

Enumerator
kGXLineJoinMiter 

Extends the outer edges of the lines until they meet at an angle, creating a sharp corner.

kGXLineJoinRound 

Rounds off the corner by drawing a circular arc between the outer edges of the lines.

kGXLineJoinBevel 

Connects the endpoints of the lines with a straight line, creating a flattened corner.

◆ GXLockMode

enum GXLockMode

Defines the level of access and control over the graphics content.

This enumeration manages how users interact with the graphics in a PDF file.

Enumerator
kGXLockModeRead 

Restrict the viewing of graphics content.

kGXLockModeWrite 

Restrict of editing graphics content.

kGXLockModeReadWrite 

Restrict both viewing and editing graphics content.

◆ GXMaskMode

enum GXMaskMode

Determines the type of mask used to control which parts of an image or graphical element are visible or affected by operations.

This enumeration specifies the way in which portions of graphics are revealed or hidden, complex transparency effects are created and modifications are applied selectively. For more information refer to section 11.6.5 Specifying soft masks of the ISO 32000-2:2020 (PDF 2.0) PDF Standard.

Enumerator
kGXMaskModeAlpha 

Uses an alpha channel to define transparency levels. Each pixel's alpha value determines its visibility. Alpha values 0 (Black): Fully transparent, 255 (White): Fully opaque, Intermediate values (e.g., 128): Semi-transparent.

kGXMaskModeInverseAlpha 

The same alpha channel is used, but the meaning of the values are reversed. Alpha values 0 (Black): Fully opaque, 255 (White): Fully transparent, Intermediate values (e.g., 128): Semi-opaque (the opposite of the alpha mask).

kGXMaskModeLuminosity 

It is based on the brightness values of the image. It allows adjusting of specific, tonal ranges, brightening highlights or darkening shadows.

kGXMaskModeInverseLuminosity 

Similar to a luminosity mask, but with inverted brightness values. It is used to highlight dark areas, darkening bright areas, or to create unique visual effects by reversing the usual brightness logic.

◆ GXPixelFormat

Defines the pixel format of the graphics application.

This enumeration represents the various pixel formats which the graphics application can operate in.

Enumerator
kGXPixelFormatUnknown 

Pixel format not known.

kGXPixelFormatRGB8 

Pixel format is RGB with 8 bits per channel.

kGXPixelFormatARGB8p 

Pixel format is Alpha RGB with 8 bits per channel, premultiplied. Alpha sets pixel transparency. RGB values have already been multiplied by the alpha value before being stored in the pixel.

kGXPixelFormatARGB8 

Pixel format is Alpha RGB with 8 bits per channel, Alpha sets pixel transparency.

kGXPixelFormatXRGB8 

Pixel format is XRGB with 8 bits per channel. X is an unused or undefined value (padding bit).

kGXPixelFormatA8 

Pixel format is an 8 bit alpha transparency channel.

kGXPixelFormatP8 

Pixel format is 8 bit palette indexed.

kGXPixelFormatL8 

Pixel format is 8 bit grayscale.

kGXPixelFormatA1 

Pixel format is 1 bit alpha transparency channel.

kGXPixelFormatP1 

Pixel format is 1 bit palette-indexed.

kGXPixelFormatL1 

Pixel format is 1 bit grayscale.

◆ GXRuntimeMode

Defines the runtime modes for the Graphics application.

This enumeration represents the various runtime modes that the Graphics application can operate in.

Enumerator
kGXRuntimeModeHardware 

Hardware mode. Utilizes GPU to accelerate rendering tasks.

kGXRuntimeModeSoftware 

Software mode. Utilizes solely CPU for rendering tasks.

kGXRuntimeModePrint 

Print mode. Optimizes rendering process specifically for printing.

Function Documentation

◆ GXBitmapCacheSetMemoryQuota()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheSetMemoryQuota ( size_t quota)
See also
GXBitmapCache

◆ GXCreateBitmap()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmap ( const GXBitmapAttrs * attrs,
GXBitmap * pbitmap )
See also
GXBitmap

◆ GXCreateBrushSolid()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushSolid ( const GXColor * color,
GXBrush * pbrush )
See also
GXBrush

◆ GXCreateGeometry()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGeometry ( GXGeometry * pgeom)
See also
GXGeometry

◆ GXCreateGradientLinear()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientLinear ( const GXLinearGradientAttrs * attrs,
GXGradient * pgradient )
See also
GXGradient

◆ GXCreatePalette()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreatePalette ( const GXColorValue * colors,
size_t num_colors,
GXPalette * ppalette )
See also
GXPalette

◆ GXCreateRegion()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRegion ( GXRegion * pregion)
See also
GXRegion

◆ GXCreateRenderTargetBitmap()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetBitmap ( GXBitmap bitmap,
GXRenderTarget * ptarget )
See also
GXRenderTarget

◆ GXCreateSystemFontFace()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateSystemFontFace ( const wchar_t * family,
GXFontStyle style,
GXFontFace * pfontface )
See also
GXFontFace

◆ GXEnableHWAccelerationForThread()

PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXEnableHWAccelerationForThread ( )

Initializes HW acceleration for the current thread.