PDF SDK Documentation

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

Loading...
Searching...
No Matches
graphics.h
Go to the documentation of this file.
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_GRAPHICS_H_INCLUDED_
4#define PDFSDK_GRAPHICS_H_INCLUDED_
5
11#include <stddef.h>
12#include <stdint.h>
13
14#include <pdfsdk/core/api_macro.h>
15#include <pdfsdk/errors.h>
16#include <pdfsdk/math_types.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
32
33typedef struct {
34 float r;
35 float g;
36 float b;
37 float a;
38} GXColor;
39
40typedef uint32_t GXColorValue;
41
42#define GXColorValueGetA(argb) (static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 24) & 0xFF) / 255.f)
43#define GXColorValueGetR(argb) (static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 16) & 0xFF) / 255.f)
44#define GXColorValueGetG(argb) (static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 8) & 0xFF) / 255.f)
45#define GXColorValueGetB(argb) (static_cast<uint8_t>((static_cast<GXColorValue>(argb) >> 0) & 0xFF) / 255.f)
46
69
80
81typedef struct {
82 void* pixels;
83 unsigned int rowLength;
84 int stride;
86
97
105typedef enum {
113} GXFillRule;
114
151
172
185
186typedef struct {
187 PDRectF bound;
188 float opacity;
189 bool isolated;
190 bool knockout;
192
208
220
226enum { kGXDashPatternMaxSize = 15 };
228typedef struct {
229 float phase;
230 float pattern[kGXDashPatternMaxSize];
231 size_t patternLen;
233
234typedef struct {
235 GXLineJoin lineJoin;
236 GXLineCap lineCap;
237 float miterLimit;
238 GXDashPattern dashes;
240
241typedef struct {
242 PDSizeI size;
243 GXPixelFormat format;
244 float dpiX;
245 float dpiY;
247
249 float position;
250 GXColorValue argb;
251};
252
253typedef struct {
254 const GXGradientStop* stops;
255 size_t numStops;
256 PDPointF startPoint;
257 PDPointF endPoint;
258 bool extendStart;
259 bool extendEnd;
260 GXColorValue bgColor;
262
263typedef struct {
264 const GXGradientStop* stops;
265 size_t numStops;
266 PDPointF startPoint;
267 float startRadius;
268 PDPointF endPoint;
269 float endRadius;
270 bool extendStart;
271 bool extendEnd;
272 GXColorValue bgColor;
274
275typedef struct {
276 PDPointF position;
277 GXColorValue color;
279
292
293typedef struct {
294 GXInterpolationMode interpolationMode;
295 GXExtendMode extendModeX;
296 GXExtendMode extendModeY;
298
310
311typedef PDErrCode(PDFSDK_CALLCONV* GXRegionRectEnumProc)(void* userdata, const PDRectI* rect);
312
313typedef unsigned int GXCacheEntryID;
314
315typedef void* GXObject;
316typedef struct GXBitmapRec_* GXBitmap;
317typedef struct GXBrushRec_* GXBrush;
318typedef struct GXFontFaceRec_* GXFontFace;
319typedef struct GXGeometryRec_* GXGeometry;
320typedef struct GXGradientRec_* GXGradient;
321typedef struct GXPaletteRec_* GXPalette;
322typedef struct GXRegionRec_* GXRegion;
323typedef struct GXRenderTargetRec_* GXRenderTarget;
324typedef struct GXHwContextRec_* GXHwContext;
325
329PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXEnableHWAccelerationForThread();
330
331PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXObjectAcquire(GXObject object);
332PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXObjectRelease(GXObject object);
333
337PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreatePalette(const GXColorValue* colors,
338 size_t num_colors,
339 GXPalette* ppalette);
340PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXPaletteGetNumColors(GXPalette palette, size_t* pnum_colors);
341PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXPaletteGetColor(GXPalette palette,
342 size_t index,
343 GXColorValue* pcolor);
344PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXPaletteGetColors(GXPalette palette,
345 const GXColorValue** pcolors);
346
350PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmap(const GXBitmapAttrs* attrs, GXBitmap* pbitmap);
351
352PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromFile(const wchar_t* filename, GXBitmap* pbitmap);
353PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromFileFrame(const wchar_t* filename,
354 uint32_t frame_index,
355 uint32_t* ptotal_frames,
356 GXBitmap* pbitmap);
357PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromMemory(void const* data,
358 size_t size,
359 GXBitmap* pbitmap);
360PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromMemoryFrame(const void* data,
361 size_t size,
362 uint32_t frame_index,
363 uint32_t* ptotal_frames,
364 GXBitmap* pbitmap);
365PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSaveToFile(GXBitmap bitmap, const wchar_t* filename);
366#ifdef _WIN32
367PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmapFromHBITMAP(void* hbitmap, GXBitmap* pbitmap);
368PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSaveToHBITMAP(GXBitmap bitmap, void** phbitmap);
369#endif
370PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetPixelFormat(GXBitmap bitmap, GXPixelFormat* pformat);
371PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetSize(GXBitmap bitmap, PDSizeI* psize);
372PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetDpiX(GXBitmap bitmap, float* pdpix);
373PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetDpiY(GXBitmap bitmap, float* pdpiy);
374PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSetPalette(GXBitmap bitmap, GXPalette palette);
375PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapGetPalette(GXBitmap bitmap, GXPalette* ppalette);
376PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapLock(GXBitmap bitmap,
377 const PDRectI* rect,
379 GXLockedData*);
380PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapUnlock(GXBitmap bitmap);
381PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCopyFromBitmap(GXBitmap bitmap,
382 const PDPointI* dest_point,
383 GXBitmap source,
384 const PDRectI* source_rect);
385PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCopyFromMemory(GXBitmap bitmap,
386 const PDRectI* dest_rect,
387 const GXLockedData* data);
388PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCopyToMemory(GXBitmap bitmap,
389 const PDRectI* source_rect,
390 const GXLockedData* data);
391PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapColorFill(GXBitmap bitmap,
392 const PDRectI* rect,
393 GXColorValue color);
394PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapNotifyChanged(GXBitmap bitmap);
395PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapSetOffscreenPainting(GXBitmap bitmap, bool offscreen);
396
400PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheSetMemoryQuota(size_t quota);
401PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheGetMemoryQuota(size_t* pquota);
402PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheGetMemoryInUse(size_t* pinuse);
403PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCachePut(GXBitmap bitmap, GXCacheEntryID* pid);
404PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheGet(GXCacheEntryID id, GXBitmap* pbitmap);
405PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheRemove(GXCacheEntryID id);
406
410PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientLinear(const GXLinearGradientAttrs* attrs,
411 GXGradient* pgradient);
412PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientRadial(const GXRadialGradientAttrs* attrs,
413 GXGradient* pgradient);
414PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientTriMesh(const GXMeshVertex* vertices,
415 size_t num_vertices,
416 GXColorValue bgcolor,
417 GXGradient* pgradient);
418
422PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushSolid(const GXColor* color, GXBrush* pbrush);
423PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushSolidARGB(GXColorValue argb, GXBrush* pbrush);
424PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushBitmap(GXBitmap bitmap,
425 float opacity,
426 const GXBitmapBrushAttrs* attrs,
427 const PDMatrix* xform,
428 GXBrush* pbrush);
429PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushGradient(GXGradient gradient,
430 float opacity,
431 const PDMatrix* xform,
432 GXBrush* pbrush);
433
437PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateSystemFontFace(const wchar_t* family,
438 GXFontStyle style,
439 GXFontFace* pfontface);
440PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateFontFaceFromFile(const wchar_t* filename,
441 uint32_t faceindex,
442 uint32_t* ptotalfaces,
443 GXFontFace* pfontface);
444PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateFontFaceFromMemory(const void* data,
445 size_t size,
446 bool copyData,
447 uint32_t faceindex,
448 uint32_t* ptotalfaces,
449 GXFontFace* pfontface);
450PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXFontFaceCalculateTextBound(GXFontFace font,
451 float fontSize,
452 const wchar_t* text,
453 PDSizeF* pbound);
454
458PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGeometry(GXGeometry* pgeom);
459PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometrySetFillRule(GXGeometry geom, GXFillRule fillrule);
460PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFillRule(GXGeometry geom, GXFillRule* pfillrule);
461PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEmpty(GXGeometry geom, bool* pempty);
462PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryPointsEqual(GXGeometry geomA,
463 GXGeometry geomB,
464 bool* pequal);
465PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetCurrentPoint(GXGeometry geom, PDPointF* ppoint);
466PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetBound(GXGeometry geom,
467 const PDMatrix* xform,
468 PDRectF* pbound);
469PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryBeginFigure(GXGeometry geom, const PDPointF* point);
470PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEndFigure(GXGeometry geom);
471PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEndFigureClose(GXGeometry geom);
472PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryLineTo(GXGeometry geom, const PDPointF* to);
473PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryConicCurveTo(GXGeometry geom,
474 const PDPointF* c,
475 const PDPointF* to);
476PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryCubicCurveTo(GXGeometry geom,
477 const PDPointF* c0,
478 const PDPointF* c1,
479 const PDPointF* to);
480PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryRectangle(GXGeometry geom, const PDRectF* rect);
481PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryEllipse(GXGeometry geom, const PDRectF* bound);
482PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryRoundRectangle(GXGeometry geom,
483 const PDRectF* rect,
484 float xradii,
485 float yradii);
486PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryCopy(GXGeometry geom, GXGeometry* pcopy);
487PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryTransform(GXGeometry geom,
488 const PDMatrix* xform,
489 GXGeometry* presult);
490PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryWiden(GXGeometry geom,
491 float width,
492 const GXStrokeParams* params,
493 float flatness,
494 GXGeometry* presult);
495PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryCombine(GXGeometry geomA,
496 GXGeometry geomB,
497 const PDMatrix* xform,
498 GXCombineMode mode,
499 float flatness,
500 GXGeometry* presult);
501PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryHitTest(GXGeometry geom,
502 const PDPointF* point,
503 bool* phit);
504PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometrySimplify(GXGeometry geom,
505 float flatness,
506 GXGeometry* presult);
507PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryIsRectangle(GXGeometry geom,
508 const PDMatrix* xform,
509 bool* pisrectangle,
510 PDRectF* prectangle);
511PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetNumFigures(GXGeometry geom, size_t* pnumfigures);
512PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigureNumSegments(GXGeometry geom, size_t figureindex, size_t* pnumsegs);
513PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigureNumPoints(GXGeometry geom, size_t figureindex, size_t* pnumpoints);
514PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigurePointsPtr(GXGeometry geom, size_t figureindex, const PDPointF** ppoints);
515PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryIsFigureSegmentCurve(GXGeometry geom, size_t figureindex, size_t segindex, bool* iscurve);
516PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryGetFigureSegmentPointsIndex(GXGeometry geom, size_t figureindex, size_t segindex, size_t* ppointsindex);
517PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXGeometryIsFigureClosed(GXGeometry geom, size_t figureindex, bool* pisclosed);
518
522PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRegion(GXRegion* pregion);
523PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRegionFromRect(const PDRectI* rect, GXRegion* pregion);
524PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionIsAreaEmpty(GXRegion region, bool* pempty);
525PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionGetBound(GXRegion region, PDRectI* pbound);
526PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionContainsPoint(GXRegion region,
527 const PDPointI* point,
528 bool* pcontains);
529PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionContainsRect(GXRegion region,
530 const PDRectI* rect,
531 bool* pcontains);
532PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionContains(GXRegion region,
533 GXRegion that_region,
534 bool* pcontains);
535PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionHasIntersection(GXRegion region,
536 GXRegion that_region,
537 bool* pisects);
538PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionHasIntersectionWithRect(GXRegion region,
539 const PDRectI* rect,
540 bool* pisects);
541PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionOffset(GXRegion region, int x, int y);
542PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionCombine(GXRegion region,
543 GXRegion that_region,
544 GXCombineMode mode,
545 GXRegion* presult);
546PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionCombineRect(GXRegion region,
547 const PDRectI* rect,
548 GXCombineMode mode,
549 GXRegion* presult);
550PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRegionEnumRects(GXRegion region,
551 GXRegionRectEnumProc proc,
552 void* userdata);
553
557PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetBitmap(GXBitmap bitmap,
558 GXRenderTarget* ptarget);
559PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetExtBuf(void* pixels,
560 int stride,
561 const GXBitmapAttrs* attrs,
562 GXRenderTarget* ptarget);
563
564#ifdef _WIN32
565PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetHWND(void* hwnd,
566 GXRuntimeMode mode,
567 GXRenderTarget* ptarget);
568PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetPrintDC(void* hdc, GXRenderTarget* ptarget);
569PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetHDC(void* hdc,
570 const PDRectI* rect,
571 GXRenderTarget* ptarget);
572#endif // _WIN32
573
574#ifdef __APPLE__
575PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetNSView(void* nsview,
576 GXRuntimeMode mode,
577 GXRenderTarget* ptarget);
578#endif // __APPLE__
579
580PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetPixelFormat(GXRenderTarget target,
581 GXPixelFormat* pformat);
582PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetSize(GXRenderTarget target, PDSizeI* psize);
583PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClear(GXRenderTarget target,
584 GXColorValue clear_color);
585PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetBeginPaint(GXRenderTarget target);
586PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetEndPaint(GXRenderTarget target);
587PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetPushState(GXRenderTarget target);
588PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetPopState(GXRenderTarget target);
589PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetCTM(GXRenderTarget target, PDMatrix* pctm);
590PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetCTM(GXRenderTarget target, const PDMatrix* ctm);
591PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetConcatCTM(GXRenderTarget target,
592 const PDMatrix* xform);
593PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetRotateCTM(GXRenderTarget target, float radians);
594PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetScaleCTM(GXRenderTarget target, float sx, float sy);
595PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetTranslateCTM(GXRenderTarget target,
596 float dx,
597 float dy);
598PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetBlendMode(GXRenderTarget target,
599 GXBlendMode mode);
600PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetStrokeAdjustment(GXRenderTarget target,
601 bool adjust);
602PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetStrokeAdjustment(GXRenderTarget target,
603 bool* padjust);
604PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetOpacityMask(GXRenderTarget target,
605 GXMaskMode mode,
606 GXBrush mask);
607PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetSetShapeMask(GXRenderTarget target,
608 GXMaskMode mode,
609 GXBrush mask);
610PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetBeginLayer(GXRenderTarget target,
611 const GXLayerParams* params);
612PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetEndLayer(GXRenderTarget target);
613PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillGeometry(GXRenderTarget target,
614 GXGeometry geom,
615 GXBrush brush);
616PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillTextGeometry(GXRenderTarget target,
617 GXGeometry geom,
618 GXBrush brush);
619PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillRect(GXRenderTarget target,
620 const PDRectF* rect,
621 GXBrush brush);
622PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillEllipse(GXRenderTarget target,
623 const PDRectF* bound,
624 GXBrush brush);
625PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeGeometry(GXRenderTarget target,
626 GXGeometry geom,
627 GXBrush brush,
628 float width,
629 const GXStrokeParams* params);
630PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeLine(GXRenderTarget target,
631 const PDPointF* start,
632 const PDPointF* end,
633 GXBrush brush,
634 float width,
635 const GXStrokeParams* params);
636PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeRect(GXRenderTarget target,
637 const PDRectF* rect,
638 GXBrush brush,
639 float width,
640 const GXStrokeParams* params);
641PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStrokeEllipse(GXRenderTarget target,
642 const PDRectF* bound,
643 GXBrush brush,
644 float width,
645 const GXStrokeParams* params);
646PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClipGeometry(GXRenderTarget target, GXGeometry geom);
647PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClipRect(GXRenderTarget target, const PDRectF* rect);
648PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetClipEllipse(GXRenderTarget target,
649 const PDRectF* bound);
650PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetDrawBitmap(GXRenderTarget target,
651 GXBitmap bitmap,
652 float opacity,
653 GXInterpolationMode imode);
654PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetStretchBitmap(GXRenderTarget target,
655 GXBitmap bitmap,
656 const PDRectF* target_rect,
657 float opacity,
658 GXInterpolationMode imode);
659PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetDrawGradient(GXRenderTarget target,
660 GXGradient gradient,
661 float opacity);
662PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillMask(GXRenderTarget target,
663 GXBitmap mask,
664 GXBrush brush,
665 GXInterpolationMode imode);
666PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetInvertRect(GXRenderTarget target,
667 const PDRectF* rect);
668PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetInvertLine(GXRenderTarget target,
669 const PDPointI* start,
670 const PDPointI* end);
671PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetFillText(GXRenderTarget target,
672 GXFontFace font,
673 float fontSize,
674 const wchar_t* text,
675 GXBrush brush);
676
677PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXRenderTargetGetDrawBounds(GXRenderTarget target, PDRectI* pbounds);
678
679#ifdef __cplusplus
680} // extern "C"
681#endif
682
683#endif // PDFSDK_GRAPHICS_H_INCLUDED_
Error codes.
int32_t PDErrCode
Definition errors.h:44
GXLockMode
Defines the level of access and control over the graphics content.
Definition graphics.h:75
@ kGXLockModeWrite
Definition graphics.h:77
@ kGXLockModeRead
Definition graphics.h:76
@ kGXLockModeReadWrite
Definition graphics.h:78
GXLineCap
Determines the style used to finish the ends of lines in a graphics context.
Definition graphics.h:201
@ kGXLineCapRound
Definition graphics.h:204
@ kGXLineCapSquare
Definition graphics.h:205
@ kGXLineCapFlat
Definition graphics.h:202
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRenderTargetBitmap(GXBitmap bitmap, GXRenderTarget *ptarget)
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBitmap(const GXBitmapAttrs *attrs, GXBitmap *pbitmap)
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateSystemFontFace(const wchar_t *family, GXFontStyle style, GXFontFace *pfontface)
GXFillRule
Determines how a path (a series or points that define a shape) is filled with color.
Definition graphics.h:105
@ kGXFillRuleNonZero
Definition graphics.h:106
@ kGXFillRuleEvenOdd
Definition graphics.h:110
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXBitmapCacheSetMemoryQuota(size_t quota)
GXInterpolationMode
Defines the way through which pixel values are estimated or interpolated.
Definition graphics.h:92
@ kGXInterpolationModeNearestNeighbor
Definition graphics.h:93
@ kGXInterpolationModeAreaAverage
Definition graphics.h:95
@ kGXInterpolationModeLinear
Definition graphics.h:94
GXRuntimeMode
Defines the runtime modes for the Graphics application.
Definition graphics.h:27
@ kGXRuntimeModePrint
Definition graphics.h:30
@ kGXRuntimeModeSoftware
Definition graphics.h:29
@ kGXRuntimeModeHardware
Definition graphics.h:28
GXBlendMode
Determines the way in which colors of overlapping objects are combined.
Definition graphics.h:124
@ kGXBlendModeDifference
Definition graphics.h:140
@ kGXBlendModeSaturation
Definition graphics.h:144
@ kGXBlendModeNormal
Definition graphics.h:125
@ kGXBlendModeExclusion
Definition graphics.h:141
@ kGXBlendModeColor
Definition graphics.h:146
@ kGXBlendModeLighten
Definition graphics.h:133
@ kGXBlendModeSoftLight
Definition graphics.h:138
@ kGXBlendModeDarken
Definition graphics.h:132
@ kGXBlendModeMultiply
Definition graphics.h:126
@ kGXBlendModeOverlay
Definition graphics.h:130
@ kGXBlendModeColorBurn
Definition graphics.h:134
@ kGXBlendModeColorDodge
Definition graphics.h:135
@ kGXBlendModeHardLight
Definition graphics.h:136
@ kGXBlendModeHue
Definition graphics.h:142
@ kGXBlendModeScreen
Definition graphics.h:128
@ kGXBlendModeLuminosity
Definition graphics.h:148
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateBrushSolid(const GXColor *color, GXBrush *pbrush)
GXCombineMode
Determines how the areas of different graphics interact with each other.
Definition graphics.h:178
@ kGXCombineModeComplement
Definition graphics.h:183
@ kGXCombineModeUnion
Definition graphics.h:180
@ kGXCombineModeExclude
Definition graphics.h:182
@ kGXCombineModeDifference
Definition graphics.h:181
@ kGXCombineModeIntersect
Definition graphics.h:179
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreatePalette(const GXColorValue *colors, size_t num_colors, GXPalette *ppalette)
GXFontStyle
Defines the various styles that can be applied to text within a PDF document.
Definition graphics.h:304
@ kGXFontStyleRegular
Definition graphics.h:305
@ kGXFontStyleItalic
Definition graphics.h:306
@ kGXFontStyleBoldItalic
Definition graphics.h:308
@ kGXFontStyleBold
Definition graphics.h:307
GXMaskMode
Determines the type of mask used to control which parts of an image or graphical element are visible ...
Definition graphics.h:159
@ kGXMaskModeInverseAlpha
Definition graphics.h:163
@ kGXMaskModeLuminosity
Definition graphics.h:166
@ kGXMaskModeInverseLuminosity
Definition graphics.h:168
@ kGXMaskModeAlpha
Definition graphics.h:160
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGradientLinear(const GXLinearGradientAttrs *attrs, GXGradient *pgradient)
GXPixelFormat
Defines the pixel format of the graphics application.
Definition graphics.h:52
@ kGXPixelFormatP8
Definition graphics.h:63
@ kGXPixelFormatA8
Definition graphics.h:62
@ kGXPixelFormatXRGB8
Definition graphics.h:60
@ kGXPixelFormatARGB8p
Definition graphics.h:55
@ kGXPixelFormatUnknown
Definition graphics.h:53
@ kGXPixelFormatL1
Definition graphics.h:67
@ kGXPixelFormatRGB8
Definition graphics.h:54
@ kGXPixelFormatA1
Definition graphics.h:65
@ kGXPixelFormatL8
Definition graphics.h:64
@ kGXPixelFormatP1
Definition graphics.h:66
@ kGXPixelFormatARGB8
Definition graphics.h:58
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateRegion(GXRegion *pregion)
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXEnableHWAccelerationForThread()
GXExtendMode
Defines the way embedded images or patterns within a PDF file are handled.
Definition graphics.h:285
@ kGXExtendModeClamp
Definition graphics.h:286
@ kGXExtendModeWrap
Definition graphics.h:288
@ kGXExtendModeMirror
Definition graphics.h:289
PDF_CORE_API PDErrCode PDFSDK_CALLCONV GXCreateGeometry(GXGeometry *pgeom)
GXLineJoin
Determines the shape that is used to connect the endpoints of two line segments that meet at a corner...
Definition graphics.h:215
@ kGXLineJoinRound
Definition graphics.h:217
@ kGXLineJoinBevel
Definition graphics.h:218
@ kGXLineJoinMiter
Definition graphics.h:216
Math types.
Definition graphics.h:241
Definition graphics.h:293
Definition graphics.h:33
Definition graphics.h:228
Definition graphics.h:248
Definition graphics.h:186
Definition graphics.h:253
Definition graphics.h:81
Definition graphics.h:275
Definition graphics.h:263
Definition graphics.h:234
Definition math_types.h:60
Definition math_types.h:12
Definition math_types.h:18
Definition math_types.h:30
Definition math_types.h:44
Definition math_types.h:24
Definition math_types.h:38