NetSurf
Data Structures | Macros | Enumerations | Functions | Variables
knockout.c File Reference

Knockout rendering implementation. More...

#include <assert.h>
#include <string.h>
#include <stdio.h>
#include "utils/utils.h"
#include "utils/log.h"
#include "utils/errors.h"
#include "netsurf/bitmap.h"
#include "content/content.h"
#include "netsurf/plotters.h"
#include "desktop/gui_internal.h"
#include "desktop/knockout.h"
Include dependency graph for knockout.c:

Go to the source code of this file.

Data Structures

struct  knockout_box
 
struct  knockout_entry
 

Macros

#define KNOCKOUT_ENTRIES   3072 /* 40 bytes each */
 
#define KNOCKOUT_BOXES   768 /* 28 bytes each */
 
#define KNOCKOUT_POLYGONS   3072 /* 4 bytes each */
 

Enumerations

enum  knockout_type {
  KNOCKOUT_PLOT_RECTANGLE , KNOCKOUT_PLOT_LINE , KNOCKOUT_PLOT_POLYGON , KNOCKOUT_PLOT_FILL ,
  KNOCKOUT_PLOT_CLIP , KNOCKOUT_PLOT_TEXT , KNOCKOUT_PLOT_DISC , KNOCKOUT_PLOT_ARC ,
  KNOCKOUT_PLOT_BITMAP , KNOCKOUT_PLOT_GROUP_START , KNOCKOUT_PLOT_GROUP_END
}
 

Functions

static nserror knockout_plot_fill_recursive (const struct redraw_context *ctx, struct knockout_box *box, plot_style_t *plot_style)
 fill an area recursively More...
 
static nserror knockout_plot_bitmap_recursive (const struct redraw_context *ctx, struct knockout_box *box, struct knockout_entry *entry)
 bitmap plot recusivley More...
 
static nserror knockout_plot_flush (const struct redraw_context *ctx)
 Flush the current knockout session to empty the buffers. More...
 
static void knockout_calculate (const struct redraw_context *ctx, int x0, int y0, int x1, int y1, struct knockout_box *owner)
 Knockout a section of previous rendering. More...
 
static nserror knockout_plot_rectangle (const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rect)
 knockout rectangle plotting. More...
 
static nserror knockout_plot_line (const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
 Knockout line plotting. More...
 
static nserror knockout_plot_polygon (const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n)
 Knockout polygon plotting. More...
 
static nserror knockout_plot_path (const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
 knockout path plotting. More...
 
static nserror knockout_plot_clip (const struct redraw_context *ctx, const struct rect *clip)
 
static nserror knockout_plot_text (const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length)
 Text plotting. More...
 
static nserror knockout_plot_disc (const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius)
 knockout circle plotting More...
 
static nserror knockout_plot_arc (const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius, int angle1, int angle2)
 Plots an arc. More...
 
static nserror knockout_plot_bitmap (const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
 knockout bitmap plotting. More...
 
static nserror knockout_plot_group_start (const struct redraw_context *ctx, const char *name)
 Start of a group of objects. More...
 
static nserror knockout_plot_group_end (const struct redraw_context *ctx)
 End a group of objects. More...
 
bool knockout_plot_start (const struct redraw_context *ctx, struct redraw_context *knk_ctx)
 Start a knockout plotting session. More...
 
bool knockout_plot_end (const struct redraw_context *ctx)
 End a knockout plotting session. More...
 

Variables

static struct knockout_entry knockout_entries [KNOCKOUT_ENTRIES]
 
static struct knockout_box knockout_boxes [KNOCKOUT_BOXES]
 
static int knockout_polygons [KNOCKOUT_POLYGONS]
 
static int knockout_entry_cur = 0
 
static int knockout_box_cur = 0
 
static int knockout_polygon_cur = 0
 
static struct knockout_boxknockout_list = NULL
 
static struct plotter_table real_plot
 
static struct rect clip_cur
 
static int nested_depth = 0
 
const struct plotter_table knockout_plotters
 knockout plotter operation table More...
 

Detailed Description

Knockout rendering implementation.

Knockout rendering is an optimisation which is particularly for unaccelerated screen redraw. It tries to avoid plotting the same area more than once.

If the object is to plot two overlapping rectangles (one large, one small), such as:

+--------------—+ |#################| |####+----—+####| |####|:::::::|####| |####|:::::::|####| |####|:::::::|####| |####+----—+####| |#################| +--------------—+

Without knockout rendering we plot the bottom rectangle and then the top one:

+--------------—+ +--------------—+ |#################| |#################| |#################| |####+----—+####| |#################| |####|:::::::|####| |#################| and then, |####|:::::::|####| |#################| |####|:::::::|####| |#################| |####+----—+####| |#################| |#################| +--------------—+ +--------------—+

With knockout rendering, the bottom rectangle is split up into smaller ones and each pixel is just plotted once:

+--------------—+ |#################| +-—+----—+-—+ |####|:::::::|####| |####|:::::::|####| |####|:::::::|####| +-—+----—+-—+ |#################| +--------------—+

Definition in file knockout.c.

Macro Definition Documentation

◆ KNOCKOUT_BOXES

#define KNOCKOUT_BOXES   768 /* 28 bytes each */

Definition at line 84 of file knockout.c.

◆ KNOCKOUT_ENTRIES

#define KNOCKOUT_ENTRIES   3072 /* 40 bytes each */

Definition at line 83 of file knockout.c.

◆ KNOCKOUT_POLYGONS

#define KNOCKOUT_POLYGONS   3072 /* 4 bytes each */

Definition at line 85 of file knockout.c.

Enumeration Type Documentation

◆ knockout_type

Enumerator
KNOCKOUT_PLOT_RECTANGLE 
KNOCKOUT_PLOT_LINE 
KNOCKOUT_PLOT_POLYGON 
KNOCKOUT_PLOT_FILL 
KNOCKOUT_PLOT_CLIP 
KNOCKOUT_PLOT_TEXT 
KNOCKOUT_PLOT_DISC 
KNOCKOUT_PLOT_ARC 
KNOCKOUT_PLOT_BITMAP 
KNOCKOUT_PLOT_GROUP_START 
KNOCKOUT_PLOT_GROUP_END 

Definition at line 90 of file knockout.c.

Function Documentation

◆ knockout_calculate()

static void knockout_calculate ( const struct redraw_context ctx,
int  x0,
int  y0,
int  x1,
int  y1,
struct knockout_box owner 
)
static

Knockout a section of previous rendering.

Parameters
ctxThe current redraw context.
x0The left edge of the removal box
y0The bottom edge of the removal box
x1The right edge of the removal box
y1The top edge of the removal box
ownerThe parent box set to consider, or NULL for top level

Definition at line 394 of file knockout.c.

References knockout_box::bbox, knockout_box::child, knockout_box::deleted, knockout_box_cur, KNOCKOUT_BOXES, knockout_boxes, knockout_calculate(), knockout_list, knockout_plot_flush(), knockout_box::next, parent, rect::x0, rect::x1, rect::y0, and rect::y1.

Referenced by knockout_calculate(), knockout_plot_bitmap(), and knockout_plot_rectangle().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_arc()

static nserror knockout_plot_arc ( const struct redraw_context ctx,
const plot_style_t pstyle,
int  x,
int  y,
int  radius,
int  angle1,
int  angle2 
)
static

Plots an arc.

plot an arc segment around (x,y), anticlockwise from angle1 to angle2. Angles are measured anticlockwise from horizontal, in degrees.

Parameters
ctxThe current redraw context.
pstyleStyle controlling the arc plot.
xThe x coordinate of the arc.
yThe y coordinate of the arc.
radiusThe radius of the arc.
angle1The start angle of the arc.
angle2The finish angle of the arc.
Returns
NSERROR_OK on success else error code.

Definition at line 807 of file knockout.c.

References knockout_entry::angle1, knockout_entry::angle2, knockout_entry::arc, knockout_entry::data, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, KNOCKOUT_PLOT_ARC, knockout_plot_flush(), NSERROR_OK, knockout_entry::plot_style, knockout_entry::radius, knockout_entry::type, knockout_entry::x, and knockout_entry::y.

Here is the call graph for this function:

◆ knockout_plot_bitmap()

static nserror knockout_plot_bitmap ( const struct redraw_context ctx,
struct bitmap bitmap,
int  x,
int  y,
int  width,
int  height,
colour  bg,
bitmap_flags_t  flags 
)
static

knockout bitmap plotting.

Tiled plot of a bitmap image. (x,y) gives the top left coordinate of an explicitly placed tile. From this tile the image can repeat in all four directions – up, down, left and right – to the extents given by the current clip rectangle.

The bitmap_flags say whether to tile in the x and y directions. If not tiling in x or y directions, the single image is plotted. The width and height give the dimensions the image is to be scaled to.

Parameters
ctxThe current redraw context.
bitmapThe bitmap to plot
xThe x coordinate to plot the bitmap
yThe y coordiante to plot the bitmap
widthThe width of area to plot the bitmap into
heightThe height of area to plot the bitmap into
bgthe background colour to alpha blend into
flagsthe flags controlling the type of plot operation
Returns
NSERROR_OK on success else error code.

Definition at line 856 of file knockout.c.

References knockout_box::bbox, netsurf_table::bitmap, knockout_entry::bitmap, bitmap(), BITMAPF_REPEAT_X, BITMAPF_REPEAT_Y, knockout_entry::box, knockout_box::child, clip_cur, knockout_entry::data, knockout_box::deleted, gui_bitmap_table::get_opaque, guit, bitmap::height, height, knockout_box_cur, KNOCKOUT_BOXES, knockout_boxes, knockout_calculate(), KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_list, KNOCKOUT_PLOT_BITMAP, knockout_plot_clip(), knockout_plot_flush(), knockout_box::next, NSERROR_OK, knockout_entry::type, bitmap::width, width, rect::x0, rect::x1, rect::y0, and rect::y1.

Here is the call graph for this function:

◆ knockout_plot_bitmap_recursive()

static nserror knockout_plot_bitmap_recursive ( const struct redraw_context ctx,
struct knockout_box box,
struct knockout_entry entry 
)
static

bitmap plot recusivley

Definition at line 221 of file knockout.c.

References knockout_entry::bitmap, plotter_table::bitmap, plotter_table::clip, knockout_entry::data, bitmap::height, knockout_plot_bitmap_recursive(), NSERROR_OK, parent, real_plot, and bitmap::width.

Referenced by knockout_plot_bitmap_recursive(), and knockout_plot_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_clip()

static nserror knockout_plot_clip ( const struct redraw_context ctx,
const struct rect clip 
)
static

Definition at line 699 of file knockout.c.

References knockout_entry::clip, clip(), clip_cur, knockout_entry::data, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, KNOCKOUT_PLOT_CLIP, knockout_plot_flush(), NSERROR_BAD_SIZE, NSERROR_OK, NSLOG, and knockout_entry::type.

Referenced by knockout_plot_bitmap().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_disc()

static nserror knockout_plot_disc ( const struct redraw_context ctx,
const plot_style_t pstyle,
int  x,
int  y,
int  radius 
)
static

knockout circle plotting

Plot a circle centered on (x,y), which is optionally filled.

Parameters
ctxThe current redraw context.
pstyleStyle controlling the circle plot.
xx coordinate of circle centre.
yy coordinate of circle centre.
radiuscircle radius.
Returns
NSERROR_OK on success else error code.

Definition at line 770 of file knockout.c.

References knockout_entry::data, knockout_entry::disc, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, KNOCKOUT_PLOT_DISC, knockout_plot_flush(), NSERROR_OK, knockout_entry::plot_style, knockout_entry::radius, knockout_entry::type, knockout_entry::x, and knockout_entry::y.

Here is the call graph for this function:

◆ knockout_plot_end()

bool knockout_plot_end ( const struct redraw_context ctx)

End a knockout plotting session.

Returns
true on success, false otherwise

Definition at line 997 of file knockout.c.

References knockout_plot_flush(), and nested_depth.

Referenced by browser_window_redraw(), content_scaled_redraw(), knockout_plot_start(), page_info_redraw(), and treeview_redraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_fill_recursive()

static nserror knockout_plot_fill_recursive ( const struct redraw_context ctx,
struct knockout_box box,
plot_style_t plot_style 
)
static

fill an area recursively

Definition at line 190 of file knockout.c.

References knockout_plot_fill_recursive(), NSERROR_OK, parent, real_plot, and plotter_table::rectangle.

Referenced by knockout_plot_fill_recursive(), and knockout_plot_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_flush()

static nserror knockout_plot_flush ( const struct redraw_context ctx)
static

Flush the current knockout session to empty the buffers.

Returns
true on success, false otherwise

Definition at line 261 of file knockout.c.

References knockout_entry::angle1, knockout_entry::angle2, knockout_entry::arc, plotter_table::arc, knockout_entry::bitmap, plotter_table::bitmap, knockout_entry::box, knockout_box::child, knockout_entry::clip, plotter_table::clip, knockout_entry::data, knockout_entry::disc, plotter_table::disc, knockout_entry::fill, plotter_table::group_end, knockout_entry::group_start, plotter_table::group_start, bitmap::height, knockout_box_cur, KNOCKOUT_BOXES, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_list, KNOCKOUT_PLOT_ARC, KNOCKOUT_PLOT_BITMAP, knockout_plot_bitmap_recursive(), KNOCKOUT_PLOT_CLIP, KNOCKOUT_PLOT_DISC, KNOCKOUT_PLOT_FILL, knockout_plot_fill_recursive(), KNOCKOUT_PLOT_GROUP_END, KNOCKOUT_PLOT_GROUP_START, KNOCKOUT_PLOT_LINE, KNOCKOUT_PLOT_POLYGON, KNOCKOUT_PLOT_RECTANGLE, KNOCKOUT_PLOT_TEXT, knockout_polygon_cur, KNOCKOUT_POLYGONS, knockout_entry::l, knockout_entry::line, plotter_table::line, knockout_entry::n, knockout_entry::name, NSERROR_OK, NSLOG, knockout_entry::p, knockout_entry::plot_style, knockout_entry::polygon, plotter_table::polygon, knockout_entry::r, knockout_entry::radius, real_plot, knockout_entry::rectangle, plotter_table::rectangle, knockout_entry::text, plotter_table::text, type, bitmap::width, knockout_entry::x, and knockout_entry::y.

Referenced by knockout_calculate(), knockout_plot_arc(), knockout_plot_bitmap(), knockout_plot_clip(), knockout_plot_disc(), knockout_plot_end(), knockout_plot_group_end(), knockout_plot_group_start(), knockout_plot_line(), knockout_plot_path(), knockout_plot_polygon(), knockout_plot_rectangle(), and knockout_plot_text().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_group_end()

static nserror knockout_plot_group_end ( const struct redraw_context ctx)
static

End a group of objects.

Used when plotter implements export to a vector graphics file format.

Parameters
ctxThe current redraw context.
Returns
NSERROR_OK on success else error code.

Definition at line 957 of file knockout.c.

References plotter_table::group_end, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_plot_flush(), KNOCKOUT_PLOT_GROUP_END, NSERROR_OK, real_plot, and knockout_entry::type.

Here is the call graph for this function:

◆ knockout_plot_group_start()

static nserror knockout_plot_group_start ( const struct redraw_context ctx,
const char *  name 
)
static

Start of a group of objects.

Used when plotter implements export to a vector graphics file format.

Parameters
ctxThe current redraw context.
nameThe name of the group being started.
Returns
NSERROR_OK on success else error code.

Definition at line 934 of file knockout.c.

References knockout_entry::data, knockout_entry::group_start, plotter_table::group_start, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_plot_flush(), KNOCKOUT_PLOT_GROUP_START, knockout_entry::name, NSERROR_OK, real_plot, and knockout_entry::type.

Here is the call graph for this function:

◆ knockout_plot_line()

static nserror knockout_plot_line ( const struct redraw_context ctx,
const plot_style_t pstyle,
const struct rect line 
)
static

Knockout line plotting.

plot a line from (x0,y0) to (x1,y1). Coordinates are at centre of line width/thickness.

Parameters
ctxThe current redraw context.
pstyleStyle controlling the line plot.
lineA rectangle defining the line to be drawn
Returns
NSERROR_OK on success else error code.

Definition at line 591 of file knockout.c.

References knockout_entry::data, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_plot_flush(), KNOCKOUT_PLOT_LINE, knockout_entry::l, knockout_entry::line, line(), NSERROR_OK, knockout_entry::plot_style, and knockout_entry::type.

Here is the call graph for this function:

◆ knockout_plot_path()

static nserror knockout_plot_path ( const struct redraw_context ctx,
const plot_style_t pstyle,
const float *  p,
unsigned int  n,
const float  transform[6] 
)
static

knockout path plotting.

The knockout implementation simply flushes the queue and plots the path directly using real plotter.

Parameters
ctxThe current redraw context.
pstyleStyle controlling the path plot.
pelements of path
nnunber of elements on path
transformA transform to apply to the path.
Returns
NSERROR_OK on success else error code.

Definition at line 678 of file knockout.c.

References knockout_plot_flush(), NSERROR_OK, plotter_table::path, and real_plot.

Here is the call graph for this function:

◆ knockout_plot_polygon()

static nserror knockout_plot_polygon ( const struct redraw_context ctx,
const plot_style_t pstyle,
const int *  p,
unsigned int  n 
)
static

Knockout polygon plotting.

Plots a filled polygon with straight lines between points. The lines around the edge of the ploygon are not plotted. The polygon is filled with the non-zero winding rule.

Parameters
ctxThe current redraw context.
pstyleStyle controlling the polygon plot.
pverticies of polygon
nnumber of verticies.
Returns
NSERROR_OK on success else error code.

Definition at line 620 of file knockout.c.

References knockout_entry::data, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_plot_flush(), KNOCKOUT_PLOT_POLYGON, knockout_polygon_cur, KNOCKOUT_POLYGONS, knockout_polygons, knockout_entry::n, NSERROR_OK, knockout_entry::p, knockout_entry::plot_style, knockout_entry::polygon, plotter_table::polygon, real_plot, and knockout_entry::type.

Here is the call graph for this function:

◆ knockout_plot_rectangle()

static nserror knockout_plot_rectangle ( const struct redraw_context ctx,
const plot_style_t pstyle,
const struct rect rect 
)
static

knockout rectangle plotting.

The rectangle can be filled an outline or both controlled by the plot style The line can be solid, dotted or dashed. Top left corner at (x0,y0) and rectangle has given width and height.

Parameters
ctxThe current redraw context.
pstyleStyle controlling the rectangle plot.
rectA rectangle defining the line to be drawn
Returns
NSERROR_OK on success else error code.

Definition at line 526 of file knockout.c.

References knockout_box::bbox, knockout_entry::box, knockout_box::child, clip_cur, knockout_entry::data, knockout_box::deleted, knockout_entry::fill, plot_style_s::fill_type, knockout_box_cur, KNOCKOUT_BOXES, knockout_boxes, knockout_calculate(), KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_list, KNOCKOUT_PLOT_FILL, knockout_plot_flush(), KNOCKOUT_PLOT_RECTANGLE, knockout_box::next, NSERROR_OK, PLOT_OP_TYPE_NONE, knockout_entry::plot_style, knockout_entry::r, knockout_entry::rectangle, plot_style_s::stroke_type, knockout_entry::type, rect::x0, rect::x1, rect::y0, and rect::y1.

Here is the call graph for this function:

◆ knockout_plot_start()

bool knockout_plot_start ( const struct redraw_context ctx,
struct redraw_context knk_ctx 
)

Start a knockout plotting session.

Parameters
ctxthe redraw context with real plotter table
knk_ctxupdated to copy of ctx, with plotter table replaced
Returns
true on success, false otherwise

Definition at line 971 of file knockout.c.

References knockout_entry_cur, knockout_plot_end(), knockout_plotters, nested_depth, redraw_context::plot, real_plot, and plotter_table::rectangle.

Referenced by browser_window_redraw(), content_scaled_redraw(), page_info_redraw(), and treeview_redraw().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ knockout_plot_text()

static nserror knockout_plot_text ( const struct redraw_context ctx,
const plot_font_style_t fstyle,
int  x,
int  y,
const char *  text,
size_t  length 
)
static

Text plotting.

Parameters
ctxThe current redraw context.
fstyleplot style for this text
xx coordinate
yy coordinate
textUTF-8 string to plot
lengthlength of string, in bytes
Returns
NSERROR_OK on success else error code.

Definition at line 735 of file knockout.c.

References knockout_entry::data, KNOCKOUT_ENTRIES, knockout_entries, knockout_entry_cur, knockout_plot_flush(), KNOCKOUT_PLOT_TEXT, NSERROR_OK, knockout_entry::text, text(), and knockout_entry::type.

Here is the call graph for this function:

Variable Documentation

◆ clip_cur

struct rect clip_cur
static

Definition at line 182 of file knockout.c.

Referenced by knockout_plot_bitmap(), knockout_plot_clip(), and knockout_plot_rectangle().

◆ knockout_box_cur

int knockout_box_cur = 0
static

◆ knockout_boxes

struct knockout_box knockout_boxes[KNOCKOUT_BOXES]
static

Definition at line 173 of file knockout.c.

Referenced by knockout_calculate(), knockout_plot_bitmap(), and knockout_plot_rectangle().

◆ knockout_entries

struct knockout_entry knockout_entries[KNOCKOUT_ENTRIES]
static

◆ knockout_entry_cur

int knockout_entry_cur = 0
static

◆ knockout_list

struct knockout_box* knockout_list = NULL
static

◆ knockout_plotters

const struct plotter_table knockout_plotters
Initial value:
= {
.group_start = knockout_plot_group_start,
.option_knockout = true,
}
static nserror knockout_plot_arc(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius, int angle1, int angle2)
Plots an arc.
Definition: knockout.c:807
static nserror knockout_plot_disc(const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius)
knockout circle plotting
Definition: knockout.c:770
static nserror knockout_plot_flush(const struct redraw_context *ctx)
Flush the current knockout session to empty the buffers.
Definition: knockout.c:261
static nserror knockout_plot_path(const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6])
knockout path plotting.
Definition: knockout.c:678
static nserror knockout_plot_group_start(const struct redraw_context *ctx, const char *name)
Start of a group of objects.
Definition: knockout.c:934
static nserror knockout_plot_group_end(const struct redraw_context *ctx)
End a group of objects.
Definition: knockout.c:957
static nserror knockout_plot_line(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line)
Knockout line plotting.
Definition: knockout.c:591
static nserror knockout_plot_text(const struct redraw_context *ctx, const plot_font_style_t *fstyle, int x, int y, const char *text, size_t length)
Text plotting.
Definition: knockout.c:735
static nserror knockout_plot_polygon(const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n)
Knockout polygon plotting.
Definition: knockout.c:620
static nserror knockout_plot_rectangle(const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rect)
knockout rectangle plotting.
Definition: knockout.c:526
static nserror knockout_plot_clip(const struct redraw_context *ctx, const struct rect *clip)
Definition: knockout.c:699
static nserror knockout_plot_bitmap(const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags)
knockout bitmap plotting.
Definition: knockout.c:856

knockout plotter operation table

Definition at line 1012 of file knockout.c.

Referenced by knockout_plot_start().

◆ knockout_polygon_cur

int knockout_polygon_cur = 0
static

Definition at line 177 of file knockout.c.

Referenced by knockout_plot_flush(), and knockout_plot_polygon().

◆ knockout_polygons

int knockout_polygons[KNOCKOUT_POLYGONS]
static

Definition at line 174 of file knockout.c.

Referenced by knockout_plot_polygon().

◆ nested_depth

int nested_depth = 0
static

Definition at line 183 of file knockout.c.

Referenced by knockout_plot_end(), and knockout_plot_start().

◆ real_plot

struct plotter_table real_plot
static