insightdock::charts::ImageBuffer

Packed RGBA image (row-major, top-to-bottom).

Synopsis

Declared in <insightdock/image_buffer.h>
class ImageBuffer;

Member Functions

Name Description
ImageBuffer [constructor]Constructors
clear clear overloads
data Raw pixel bytes (size = width × height × 4).
draw_dashed_line Antialiased line segment with a dash pattern.
draw_dashed_polyline Open polyline through count points with a dash pattern carried continuously across vertices.
draw_line Filled antialiased line segment with round caps.
draw_polygon_outline Closed polygon outline.
draw_polyline Open polyline through count points.
fill_circle Filled circle with antialiased edge.
fill_polygon Fill a convex polygon from vertex list.
fill_rect fill_rect overloads
fill_rounded_rect Fill an axis-aligned rectangle with rounded corners (antialiased).
fill_sector Filled pie slice (sector).
height Height in pixels.
pixel pixel overloads
width Width in pixels.

Static Member Functions

Name Description
dimensions_ok True if a width × height buffer is within kMaxPixels (overflow-safe).
downsample Box-filter downsample for supersampling anti-aliasing.

Static Data Members

Name Description
kMaxPixels Largest buffer (in pixels) the library will allocate (~512 MB of RGBA).

Non-Member Functions

Name Description
encode_jpegEncode an RGBA buffer to JPEG bytes in memory.
encode_pngEncode an RGBA buffer to PNG bytes in memory.

Description

Each pixel is four bytes: R, G, B, A. Origin (0,0) is top-left.

Created with MrDocs