Pt::Gfx Namespace Reference

Detailed Description

Pt::Gfx provides APIs for drawing 2D shapes and text on different paint surfaces, such as in-memory bitmaps. It also provides image, view and pixel classes for storing image data, accessing pixels and working with image formats.

Classes

class  Argb32
 ARGB-32 image format. More...
 
class  Argb32ConstPixel
 ARGB-32 const pixel. More...
 
class  Argb32Image
 Image storing pixels in ARGB-32 format. More...
 
class  Argb32Pixel
 ARGB-32 pixel. More...
 
class  BasicConstImage
 Basic const image. More...
 
class  BasicImage
 Basic image. More...
 
class  Bitmap
 Off-screen drawing surface backed by an image. More...
 
class  Brush
 Fill description for shapes and text. More...
 
class  Canvas
 Backend canvas for drawing commands. More...
 
class  Color
 Standard color type. More...
 
struct  ColorConverter
 Converts between public color types. More...
 
class  ColorF
 
class  ColorStop
 Color stop for a gradient brush. More...
 
class  ColorStops
 Ordered collection of gradient color stops. More...
 
class  CompositionMode
 Blend mode used for drawing operations. More...
 
class  Font
 Font request used for text drawing and measurement. More...
 
class  FontMetrics
 Metrics that describe a font face at a given size. More...
 
class  ImageFormat
 Image format. More...
 
struct  ImageTraits
 Image traits. More...
 
class  JpegReader
 Reader for JPEG images. More...
 
class  Paint
 Paint state used by drawing operations. More...
 
class  PaintContext
 Active painting session for a surface. More...
 
class  Painter
 Concrete painter for Pt::Gfx paint targets. More...
 
class  PainterBase
 Base class for drawing commands and paint state. More...
 
class  PaintSurface
 Abstract target for drawing operations. More...
 
class  Path
 Vector path for drawing outlines and filled shapes. More...
 
class  PathElement
 Read-only view of a path element. More...
 
class  PathIterator
 Forward iterator over path elements. More...
 
class  Pen
 Attributes for the drawing of outlines. More...
 
class  PixelBase
 Pixel base class. More...
 
class  PngReader
 Reader for PNG images. More...
 
class  PngWriter
 Writer for PNG images. More...
 
class  Point
 Point with floating-point X and Y coordinates. More...
 
class  PointI
 Point with integer X and Y coordinates. More...
 
class  Rect
 Rect with floating-point coordinates. More...
 
class  RectI
 Rect with integer coordinates. More...
 
class  Rgb16
 RGB-565 image format. More...
 
class  Rgb16Color
 Native RGB-565 color type. More...
 
class  Rgb16ConstPixel
 RGB-565 const pixel. More...
 
class  Rgb16Pixel
 RGB-565 pixel. More...
 
class  Rgb32
 Premultiplied ARGB-32 image format. More...
 
class  Rgb32Color
 Premultiplied standard color type. More...
 
class  Rgb32ConstPixel
 Premultiplied ARGB-32 const pixel. More...
 
class  Rgb32Image
 Image storing pixels in premultiplied ARGB-32 format. More...
 
class  Rgb32Pixel
 RGB-32 pixel as premultiplied ARGB-32. More...
 
class  Scaling
 Logical-to-physical unit conversion. More...
 
class  Size
 Size with floating-point width and height. More...
 
class  SizeI
 Size with integer width and height. More...
 
class  TextMetrics
 Metrics for a measured line of text. More...
 
class  Transform
 Affine transform for drawing coordinates. More...
 
class  Yuv12
 YV-12 image format. More...
 
class  Yuv12ConstPixel
 YV12 const pixel. More...
 
class  Yuv12Pixel
 YV-12 pixel. More...
 

Typedefs

typedef BasicConstImage< Argb32Argb32ConstImage
 ARGB-32 const image.
 
typedef BasicView< Argb32Argb32View
 ARGB-32 view.
 
typedef BasicConstView< Argb32Argb32ConstView
 ARGB-32 const view.
 
typedef BasicPixelView< Argb32Argb32PixelView
 ARGB-32 pixel view.
 
typedef BasicConstPixelView< Argb32Argb32ConstPixelView
 ARGB-32 const pixel view.
 
typedef BasicLineView< Argb32Argb32LineView
 ARGB-32 line view.
 
typedef BasicConstLineView< Argb32Argb32ConstLineView
 ARGB-32 const line view.
 
typedef Span< Argb32Argb32Span
 ARGB-32 span.
 
typedef ConstSpan< Argb32Argb32ConstSpan
 ARGB-32 const span.
 
typedef BasicImage< Rgb16Rgb16Image
 RGB-16 image.
 
typedef BasicConstImage< Rgb16Rgb16ConstImage
 RGB-16 const image.
 
typedef BasicView< Rgb16Rgb16View
 RGB-16 view.
 
typedef BasicConstView< Rgb16Rgb16ConstView
 RGB-16 const view.
 
typedef BasicPixelView< Rgb16Rgb16PixelView
 RGB-16 pixel view.
 
typedef BasicConstPixelView< Rgb16Rgb16ConstPixelView
 RGB-16 const pixel view.
 
typedef BasicLineView< Rgb16Rgb16LineView
 RGB-16 line view.
 
typedef BasicConstLineView< Rgb16Rgb16ConstLineView
 RGB-16 const line view.
 
typedef Span< Rgb16Rgb16Span
 RGB-16 span.
 
typedef ConstSpan< Rgb16Rgb16ConstSpan
 RGB-16 const span.
 
typedef BasicConstImage< Rgb32Rgb32ConstImage
 RGB-32 const image.
 
typedef BasicView< Rgb32Rgb32View
 RGB-32 view.
 
typedef BasicConstView< Rgb32Rgb32ConstView
 RGB-32 const view.
 
typedef BasicPixelView< Rgb32Rgb32PixelView
 RGB-32 pixel view.
 
typedef BasicConstPixelView< Rgb32Rgb32ConstPixelView
 RGB-32 const pixel view.
 
typedef BasicLineView< Rgb32Rgb32LineView
 RGB-32 line view.
 
typedef BasicConstLineView< Rgb32Rgb32ConstLineView
 RGB-32 const line view.
 
typedef Span< Rgb32Rgb32Span
 RGB-32 span.
 
typedef ConstSpan< Rgb32Rgb32ConstSpan
 RGB-32 const span.
 
typedef BasicImage< Yuv12Yuv12Image
 YUV-12 image.
 
typedef BasicConstImage< Yuv12Yuv12ConstImage
 YUV-12 const image.
 
typedef BasicView< Yuv12Yuv12View
 YUV-12 view.
 
typedef BasicView< Yuv12Yuv12ConstView
 YUV-12 conmst view.
 
typedef BasicPixelView< Yuv12Yuv12PixelView
 YUV-12 pixel view.
 
typedef BasicConstPixelView< Yuv12Yuv12ConstPixelView
 YUV-12 const pixel view.
 
typedef BasicLineView< Yuv12Yuv12LineView
 YUV-12 line view.
 
typedef BasicConstLineView< Yuv12Yuv12ConstLineView
 YUV-12 const line view.
 
typedef Span< Yuv12Yuv12Span
 YUV-12 span.
 
typedef ConstSpan< Yuv12Yuv12ConstSpan
 YUV-12 const span.
 

Enumerations

enum  FillRule {
  NonZero,
  EvenOdd
}
 Determines how overlapping subpaths of a filled shape are painted. More...
 

Functions

void sourceCopy (Argb32Pixel &to, std::size_t length, const Color &from)
 Copies one color to N destination pixels.
 
void sourceOver (Argb32Pixel &to, std::size_t length, const Color &from)
 Blends one color over N destination pixels.
 
void sourceCopy (Argb32Pixel &to, const Argb32ConstPixel &from, std::size_t length)
 Copies N source pixels to N destination pixels.
 
void sourceOver (Argb32Pixel &to, const Argb32ConstPixel &from, std::size_t length)
 Blends N source pixels over N destination pixels.
 
template<typename FromView , typename ToView >
void blockScale (const FromView &from, ToView &to)
 Block scale from a source view to a target view.
 
template<typename P1 , typename P2 >
void copyPixel (const P1 &from, P2 &to)
 Copies a single pixel.
 
template<typename P1 , typename P2 >
void copyPixel (const P1 &from, P2 &to, std::size_t length)
 Copies a span of pixels.
 
void sourceCopy (Rgb32Pixel &to, std::size_t length, const Rgb32Color &from)
 Copies one color to N destination pixels.
 
void sourceOver (Rgb32Pixel &to, std::size_t length, const Rgb32Color &from)
 Blends one color over N destination pixels.
 
void sourceCopy (Rgb32Pixel &to, const Rgb32ConstPixel &from, std::size_t length)
 Copies N source pixels to N destination pixels.
 
void sourceOver (Rgb32Pixel &to, const Rgb32ConstPixel &from, std::size_t length)
 Blends N source pixels over N destination pixels.
 
template<typename SpanT , typename P >
void copySpanTo (const SpanT &from, P &to)
 Copies the pixels of a span to a pixel position. More...
 
template<typename FromSpanT , typename ToSpanT >
void copySpan (const FromSpanT &from, ToSpanT &to)
 Copies the pixels of a span to another span. More...
 
template<typename From , typename P >
void copyViewTo (const From &from, P &to)
 Copies the pixels of a view to a pixel position. More...
 
template<typename From , typename To >
void copyView (const From &from, To &to)
 Copies the pixels of a view to another one. More...
 

Function Documentation

◆ copySpanTo()

void Pt::Gfx::copySpanTo ( const SpanT &  from,
P &  to 
)

Copies from.length() pixels without bounds checking. The caller must ensure that enough space is available at 'to'.

◆ copySpan()

void Pt::Gfx::copySpan ( const FromSpanT &  from,
ToSpanT &  to 
)

Copies min(from.length(), to.length()) pixels.

◆ copyViewTo()

void Pt::Gfx::copyViewTo ( const From &  from,
P &  to 
)

Copies from.width() x from.height() pixels without bounds checking. The caller must ensure that enough space is available at 'to'.

◆ copyView()

void Pt::Gfx::copyView ( const From &  from,
To &  to 
)

Copies min(widths) x min(heights) pixels.