NetSurf
|
#include <assert.h>
#include <sys/types.h>
#include <stdint.h>
#include <string.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <mt_gem.h>
#include <mint/osbind.h>
#include "utils/log.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "netsurf/bitmap.h"
#include "netsurf/plotters.h"
#include "netsurf/mouse.h"
#include "atari/gui.h"
#include "atari/osspec.h"
#include "atari/misc.h"
#include "atari/bitmap.h"
#include "utils/nsoption.h"
#include "atari/plot/eddi.h"
#include "atari/plot/fontplot.h"
#include "atari/plot/plot.h"
Go to the source code of this file.
Data Structures | |
struct | s_view |
Typedefs | |
typedef bool(* | bitmap_convert_fnc) (struct bitmap *img, int x, int y, GRECT *clip, uint32_t bg, uint32_t flags, MFDB *out) |
Functions | |
void | vq_scrninfo (VdiHdl handle, short *work_out) |
static void | snapshot_suspend (void) |
Garbage collection of the snapshot routine. More... | |
static void | snapshot_destroy (void) |
destroy memory used by screenshot More... | |
const char * | plot_err_str (int i) |
translate an error number More... | |
static void | vsl_rgbcolor (short vdih, colour cin) |
Set line drawing color by passing netsurf XBGR "colour" type. More... | |
static void | vsf_rgbcolor (short vdih, colour cin) |
Set fill color by passing netsurf XBGR "colour" type. More... | |
static void | plot_get_visible_grect (GRECT *out) |
Get current visible coords. More... | |
static void | update_visible_rect (void) |
static bool | fbrect_to_screen (GRECT box, GRECT *ret) |
Returns the visible parts of the box. More... | |
bool | plot_copy_rect (GRECT src, GRECT dst) |
copy an rectangle from the plot buffer to screen More... | |
static void | read_vdi_sysinfo (short vdih, struct s_vdi_sysinfo *info) |
Fill the screen info structure. More... | |
void | rgb_to_vdi1000 (unsigned char *in, RGB1000 *out) |
Convert an RGB color to an VDI Color. More... | |
void | vdi1000_to_rgb (unsigned short *in, unsigned char *out) |
static void | dump_vdi_info (short vdih) |
static MFDB * | snapshot_create_native_mfdb (int x, int y, int w, int h) |
Create an snapshot of the screen image in device format. More... | |
static struct bitmap * | snapshot_create (int x, int y, int w, int h) |
Create an snapshot of the screen in netsurf ABGR format. More... | |
static uint32_t | ablend (uint32_t pixel, uint32_t scrpixel) |
static bool | ablend_pixel (struct bitmap *img, uint32_t bg, GRECT *clip) |
Alpha blends an image, using one pixel as the background. More... | |
static bool | ablend_bitmap (struct bitmap *img, struct bitmap *bg, GRECT *img_clip, GRECT *bg_clip) |
Aplha blends the foreground image onto thebackground images. More... | |
static bool | bitmap_convert_tc (struct bitmap *img, int x, int y, GRECT *clip, uint32_t bg, uint32_t flags, MFDB *out) |
Convert bitmap to the native screen format. More... | |
static void | convert_bitmap_done (void) |
bool | plot_blit_bitmap (struct bitmap *bmp, int x, int y, unsigned long bg, unsigned long flags) |
bool | plot_blit_mfdb (GRECT *loc, MFDB *insrc, short fgcolor, uint32_t flags) |
int | plot_init (const struct redraw_context *ctx, char *fdrvrname) |
Init screen and font driver objects. More... | |
int | plot_finalise (void) |
bool | plot_lock (void) |
bool | plot_unlock (void) |
bool | plot_set_dimensions (const struct redraw_context *ctx, int x, int y, int w, int h) |
Set plot origin and canvas size. More... | |
bool | plot_get_dimensions (GRECT *dst) |
Get current canvas size. More... | |
float | plot_set_scale (float scale) |
set scale of plotter. More... | |
float | plot_get_scale (void) |
void | plot_set_abs_clipping (const GRECT *area) |
Subsequent calls to plot_clip will be clipped by the absolute clip. More... | |
void | plot_get_abs_clipping (struct rect *dst) |
Get the maximum clip extent, in absolute screen coords. More... | |
void | plot_get_abs_clipping_grect (GRECT *dst) |
Get the maximum clip extent, in absolute screen coords. More... | |
VdiHdl | plot_get_vdi_handle (void) |
long | plot_get_flags (void) |
bool | plot_get_clip (struct rect *out) |
void | plot_get_clip_grect (GRECT *out) |
Get clipping for current framebuffer as GRECT. More... | |
FONT_PLOTTER | plot_get_text_plotter () |
void | plot_set_text_plotter (FONT_PLOTTER font_plotter) |
static nserror | plot_clip (const struct redraw_context *ctx, const struct rect *clip) |
Sets a clip rectangle for subsequent plot operations. More... | |
static nserror | 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 | plot_disc (const struct redraw_context *ctx, const plot_style_t *pstyle, int x, int y, int radius) |
Plots a circle. More... | |
static nserror | plot_line (const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *line) |
Plots a line. More... | |
static nserror | plot_rectangle (const struct redraw_context *ctx, const plot_style_t *pstyle, const struct rect *rect) |
Plots a rectangle. More... | |
static nserror | plot_polygon (const struct redraw_context *ctx, const plot_style_t *pstyle, const int *p, unsigned int n) |
Plot a polygon. More... | |
static nserror | plot_path (const struct redraw_context *ctx, const plot_style_t *pstyle, const float *p, unsigned int n, const float transform[6]) |
Plots a path. More... | |
static nserror | plot_bitmap (const struct redraw_context *ctx, struct bitmap *bitmap, int x, int y, int width, int height, colour bg, bitmap_flags_t flags) |
Plot a bitmap. More... | |
static nserror | plot_text (const struct redraw_context *ctx, const struct plot_font_style *fstyle, int x, int y, const char *text, size_t length) |
Text plotting. More... | |
Variables | |
static const char * | plot_error_codes [] |
FONT_PLOTTER | fplotter = NULL |
short | vdih |
static void * | buf_packed |
static int | size_buf_packed |
void * | buf_planar |
int | size_buf_planar |
static MFDB | buf_scr |
static int | size_buf_scr |
MFDB | buf_std |
int | size_buf_std |
struct bitmap * | buf_scr_compat |
static HermesFormat | vfmt |
static HermesFormat | nsfmt |
struct s_vdi_sysinfo | vdi_sysinfo |
static int | atari_plot_bpp_virt |
static struct s_view | view |
static HermesHandle | hermes_cnv_h |
static HermesHandle | hermes_res_h |
static struct bitmap | snapshot |
VdiHdl | atari_plot_vdi_handle = -1 |
unsigned long | atari_plot_flags |
unsigned long | atari_font_flags |
static bitmap_convert_fnc | bitmap_convert |
const struct plotter_table | atari_plotters |
atari plottr operation table More... | |
|
inlinestatic |
Definition at line 940 of file plot.c.
Referenced by ablend_bitmap(), and ablend_pixel().
|
inlinestatic |
Aplha blends the foreground image onto thebackground images.
The background receives the blended image pixels.
Definition at line 984 of file plot.c.
References ablend(), atari_bitmap_get_rowstride(), and bitmap::pixdata.
Referenced by bitmap_convert_tc().
|
inlinestatic |
Alpha blends an image, using one pixel as the background.
The bitmap receives the result.
Definition at line 961 of file plot.c.
References ablend(), atari_bitmap_get_rowstride(), clip(), and bitmap::pixdata.
Referenced by bitmap_convert_tc().
|
static |
Convert bitmap to the native screen format.
img | the bitmap |
x | coordinate where the bitmap REGION (described in clip) shall be drawn (screen coords) |
y | coordinate where the bitmap REGION (described in clip) shall be drawn (screen coords) |
clip | which area of the bitmap shall be drawn |
bg | background color |
flags | blit flags |
out | the result MFDB |
Definition at line 1308 of file plot.c.
References ablend_bitmap(), ablend_pixel(), atari_bitmap_destroy(), atari_bitmap_get_height(), atari_bitmap_get_opaque(), atari_bitmap_get_width(), atari_plot_bpp_virt, atari_plot_flags, BITMAPF_BUFFER_NATIVE, BITMAPF_MONOGLYPH, buf_packed, clip(), CONV_BLOCK_SIZE, bitmap::converted, ERR_NO_MEM, hermes_cnv_h, MFDB_STRIDE, bitmap::native, nsfmt, bitmap::opaque, bitmap::pixdata, PLOT_FLAG_TRANS, bitmap::rowstride, size_buf_packed, snapshot_create(), and vfmt.
Referenced by plot_init().
|
inlinestatic |
Definition at line 1468 of file plot.c.
References buf_packed, CONV_KEEP_LIMIT, and size_buf_packed.
Referenced by plot_blit_bitmap().
|
static |
Definition at line 710 of file plot.c.
References s_vdi_sysinfo::clut, s_vdi_sysinfo::colors, s_vdi_sysinfo::EdDiVersion, s_vdi_sysinfo::hicolors, s_vdi_sysinfo::mask_a, s_vdi_sysinfo::mask_b, s_vdi_sysinfo::mask_g, s_vdi_sysinfo::mask_r, s_vdi_sysinfo::maxintin, s_vdi_sysinfo::maxpolycoords, s_vdi_sysinfo::pitch, s_vdi_sysinfo::pixelsize, s_vdi_sysinfo::rasterscale, read_vdi_sysinfo(), s_vdi_sysinfo::scr_bpp, s_vdi_sysinfo::scr_h, s_vdi_sysinfo::scr_w, s_vdi_sysinfo::screen, s_vdi_sysinfo::screensize, s_vdi_sysinfo::vdi_handle, s_vdi_sysinfo::vdiformat, and vdih.
Referenced by plot_init().
|
inlinestatic |
Returns the visible parts of the box.
The returned values are relative coords within framebuffer, relative to screen coords (normally starting at 0,0 )
Definition at line 335 of file plot.c.
References s_view::h, s_vdi_sysinfo::scr_h, s_vdi_sysinfo::scr_w, vdi_sysinfo, view, s_view::w, s_view::x, and s_view::y.
|
static |
Plots an arc.
plot an arc segment around (x,y), anticlockwise from angle1 to angle2. Angles are measured anticlockwise from horizontal, in degrees.
ctx | The current redraw context. |
pstyle | Style controlling the arc plot. |
x | The x coordinate of the arc. |
y | The y coordinate of the arc. |
radius | The radius of the arc. |
angle1 | The start angle of the arc. |
angle2 | The finish angle of the arc. |
Definition at line 2043 of file plot.c.
References atari_plot_vdi_handle, plot_style_s::fill_colour, plot_style_s::fill_type, NSERROR_OK, PLOT_OP_TYPE_NONE, PLOT_OP_TYPE_SOLID, plot_style_s::stroke_colour, view, vsf_rgbcolor(), vsl_rgbcolor(), s_view::x, and s_view::y.
|
static |
Plot a bitmap.
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.
ctx | The current redraw context. |
bitmap | The bitmap to plot |
x | The x coordinate to plot the bitmap |
y | The y coordiante to plot the bitmap |
width | The width of area to plot the bitmap into |
height | The height of area to plot the bitmap into |
bg | the background colour to alpha blend into |
flags | the flags controlling the type of plot operation |
Definition at line 2386 of file plot.c.
References atari_bitmap_get_height(), atari_bitmap_get_width(), atari_bitmap_resize(), bitmap(), BITMAPF_REPEAT_X, BITMAPF_REPEAT_Y, clip(), height, hermes_res_h, NSERROR_NOMEM, NSERROR_OK, nsfmt, plot_blit_bitmap(), plot_get_clip(), bitmap::resized, s_view::scale, view, and width.
bool plot_blit_bitmap | ( | struct bitmap * | bmp, |
int | x, | ||
int | y, | ||
unsigned long | bg, | ||
unsigned long | flags | ||
) |
Definition at line 1482 of file plot.c.
References atari_plot_vdi_handle, bitmap_convert, clip(), s_view::clipping, convert_bitmap_done(), bitmap::height, plot_get_visible_grect(), snapshot_suspend(), view, bitmap::width, s_view::x, rect::x0, rect::x1, s_view::y, rect::y0, and rect::y1.
Referenced by plot_bitmap().
bool plot_blit_mfdb | ( | GRECT * | loc, |
MFDB * | insrc, | ||
short | fgcolor, | ||
uint32_t | flags | ||
) |
Definition at line 1551 of file plot.c.
References atari_plot_vdi_handle, init_mfdb(), PLOT_FLAG_TRANS, plot_get_clip_grect(), view, s_view::x, and s_view::y.
|
static |
Sets a clip rectangle for subsequent plot operations.
ctx | The current redraw context. |
clip | The rectangle to limit all subsequent plot operations within. |
Definition at line 1974 of file plot.c.
References atari_plot_vdi_handle, clip(), s_view::clipping, NSERROR_OK, plot_get_abs_clipping_grect(), plot_get_clip_grect(), plot_get_dimensions(), s_vdi_sysinfo::scr_h, s_vdi_sysinfo::scr_w, vdi_sysinfo, view, rect::x0, rect::x1, rect::y0, and rect::y1.
bool plot_copy_rect | ( | GRECT | src, |
GRECT | dst | ||
) |
copy an rectangle from the plot buffer to screen
because this is an on-screen plotter, this is an screen to screen copy.
Definition at line 374 of file plot.c.
References atari_plot_vdi_handle, plot_get_visible_grect(), plot_lock(), plot_unlock(), view, s_view::x, and s_view::y.
|
static |
Plots a circle.
Plot a circle centered on (x,y), which is optionally filled.
ctx | The current redraw context. |
pstyle | Style controlling the circle plot. |
x | x coordinate of circle centre. |
y | y coordinate of circle centre. |
radius | circle radius. |
Definition at line 2090 of file plot.c.
References atari_plot_vdi_handle, plot_style_s::fill_colour, plot_style_s::fill_type, NSERROR_OK, PLOT_OP_TYPE_SOLID, plot_style_s::stroke_colour, view, vsf_rgbcolor(), s_view::x, and s_view::y.
const char * plot_err_str | ( | int | i | ) |
translate an error number
Definition at line 216 of file plot.c.
References plot_error_codes.
Referenced by plot_init().
int plot_finalise | ( | void | ) |
Definition at line 1748 of file plot.c.
References atari_plot_vdi_handle, buf_packed, buf_planar, delete_font_plotter(), fplotter, hermes_cnv_h, snapshot_destroy(), and vfmt.
Referenced by gui_quit().
void plot_get_abs_clipping | ( | struct rect * | dst | ) |
Get the maximum clip extent, in absolute screen coords.
dst | the structure that receives the absolute clipping |
Definition at line 1899 of file plot.c.
References s_view::abs_clipping, and view.
void plot_get_abs_clipping_grect | ( | GRECT * | dst | ) |
Get the maximum clip extent, in absolute screen coords.
dst | the structure that receives the absolute clipping |
Definition at line 1909 of file plot.c.
References s_view::abs_clipping, view, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by plot_clip().
bool plot_get_clip | ( | struct rect * | out | ) |
Definition at line 1930 of file plot.c.
References s_view::clipping, view, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by plot_bitmap(), and plot_get_clip_grect().
void plot_get_clip_grect | ( | GRECT * | out | ) |
Get clipping for current framebuffer as GRECT.
Definition at line 1940 of file plot.c.
References clip(), and plot_get_clip().
Referenced by plot_blit_mfdb(), and plot_clip().
bool plot_get_dimensions | ( | GRECT * | dst | ) |
Get current canvas size.
dst | the GRECT * which receives the canvas size |
Definition at line 1838 of file plot.c.
References s_view::h, view, s_view::w, s_view::x, and s_view::y.
Referenced by plot_clip(), and plot_set_abs_clipping().
long plot_get_flags | ( | void | ) |
Definition at line 1924 of file plot.c.
References atari_plot_flags.
Referenced by atari_treeview_redraw().
float plot_get_scale | ( | void | ) |
Definition at line 1864 of file plot.c.
References s_view::scale, and view.
Referenced by atari_font_position(), atari_font_split(), and atari_font_width().
FONT_PLOTTER plot_get_text_plotter | ( | void | ) |
VdiHdl plot_get_vdi_handle | ( | void | ) |
Definition at line 1918 of file plot.c.
References atari_plot_vdi_handle.
Referenced by atari_about_show(), atari_treeview_redraw(), and window_redraw_favicon().
|
inlinestatic |
Get current visible coords.
Definition at line 279 of file plot.c.
References view, s_view::vis_h, s_view::vis_w, s_view::vis_x, and s_view::vis_y.
Referenced by plot_blit_bitmap(), and plot_copy_rect().
int plot_init | ( | const struct redraw_context * | ctx, |
char * | fdrvrname | ||
) |
Init screen and font driver objects.
ctx | The current redraw context. |
fdrvrname | font driver name. |
Definition at line 1612 of file plot.c.
References atari_font_flags, atari_plot_bpp_virt, atari_plot_flags, atari_plot_vdi_handle, bitmap_convert, bitmap_convert_tc(), buf_packed, buf_planar, clip(), plotter_table::clip, die(), dump_font_drivers(), dump_vdi_info(), FONTPLOT_FLAG_MONOGLYPH, fplotter, s_view::h, hermes_cnv_h, hermes_res_h, s_vdi_sysinfo::mask_a, s_vdi_sysinfo::mask_b, s_vdi_sysinfo::mask_g, s_vdi_sysinfo::mask_r, new_font_plotter(), nsfmt, NSLOG, nsoption_int, redraw_context::plot, plot_err_str(), PLOT_FLAG_DITHER, PLOT_FLAG_TRANS, plot_set_scale(), read_vdi_sysinfo(), rgb_to_vdi1000(), s_vdi_sysinfo::scr_bpp, size_buf_packed, size_buf_planar, update_visible_rect(), vdi1000_to_rgb(), VDI_FORMAT_PACK, vdi_sysinfo, s_vdi_sysinfo::vdiformat, verbose_log, vfmt, view, s_view::w, s_view::x, and s_view::y.
Referenced by gui_init().
|
static |
Plots a line.
plot a line from (x0,y0) to (x1,y1). Coordinates are at centre of line width/thickness.
ctx | The current redraw context. |
pstyle | Style controlling the line plot. |
line | A rectangle defining the line to be drawn |
Definition at line 2121 of file plot.c.
References atari_plot_vdi_handle, s_view::h, line(), NSERROR_OK, NSLT2VDI, plot_style_fixed_to_int, plot_style_s::stroke_colour, plot_style_s::stroke_width, view, vsl_rgbcolor(), s_view::x, and s_view::y.
bool plot_lock | ( | void | ) |
Definition at line 1775 of file plot.c.
References atari_plot_flags, and PLOT_FLAG_LOCKED.
Referenced by atari_treeview_redraw(), plot_copy_rect(), and window_process_redraws().
|
static |
Plots a path.
Path plot consisting of cubic Bezier curves. Line and fill colour is controlled by the plot style.
ctx | The current redraw context. |
pstyle | Style controlling the path plot. |
p | elements of path |
n | nunber of elements on path |
transform | A transform to apply to the path. |
Definition at line 2350 of file plot.c.
References NSERROR_OK.
|
static |
Plot a polygon.
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.
ctx | The current redraw context. |
pstyle | Style controlling the polygon plot. |
p | verticies of polygon |
n | number of verticies. |
Definition at line 2304 of file plot.c.
References atari_plot_vdi_handle, plot_style_s::fill_colour, plot_style_s::fill_type, s_vdi_sysinfo::maxpolycoords, NSERROR_OK, PLOT_OP_TYPE_SOLID, plot_style_s::stroke_colour, vdi_sysinfo, view, vsf_rgbcolor(), vsl_rgbcolor(), s_view::x, and s_view::y.
|
static |
Plots a rectangle.
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.
ctx | The current redraw context. |
pstyle | Style controlling the rectangle plot. |
rect | A rectangle defining the line to be drawn |
Definition at line 2180 of file plot.c.
References atari_plot_vdi_handle, s_view::clipping, plot_style_s::fill_colour, plot_style_s::fill_type, NSERROR_OK, NSLT2VDI, PLOT_OP_TYPE_NONE, plot_style_fixed_to_int, plot_style_s::stroke_colour, plot_style_s::stroke_type, plot_style_s::stroke_width, view, s_view::vis_h, s_view::vis_w, vsf_rgbcolor(), vsl_rgbcolor(), s_view::x, rect::x0, rect::x1, s_view::y, rect::y0, and rect::y1.
void plot_set_abs_clipping | ( | const GRECT * | area | ) |
Subsequent calls to plot_clip will be clipped by the absolute clip.
area | the maximum clipping rectangle (absolute screen coords) |
Definition at line 1875 of file plot.c.
References s_view::abs_clipping, plot_get_dimensions(), view, rect::x0, rect::x1, rect::y0, and rect::y1.
Referenced by plot_set_dimensions(), and window_process_redraws().
bool plot_set_dimensions | ( | const struct redraw_context * | ctx, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
Set plot origin and canvas size.
ctx | The current redraw context. |
x | the x origin |
y | the y origin |
w | the width of the plot area |
h | the height of the plot area |
Definition at line 1806 of file plot.c.
References plotter_table::clip, s_view::h, redraw_context::plot, plot_set_abs_clipping(), update_visible_rect(), view, s_view::w, s_view::x, and s_view::y.
Referenced by atari_treeview_redraw(), toolbar_redraw(), window_redraw_content(), and window_redraw_favicon().
float plot_set_scale | ( | float | scale | ) |
set scale of plotter.
scale | the new scale value |
Definition at line 1854 of file plot.c.
References s_view::scale, and view.
Referenced by plot_init(), toolbar_redraw(), and window_redraw_content().
void plot_set_text_plotter | ( | FONT_PLOTTER | font_plotter | ) |
|
static |
Text plotting.
ctx | The current redraw context. |
fstyle | plot style for this text |
x | x coordinate |
y | y coordinate |
text | UTF-8 string to plot |
length | length of string, in bytes |
Definition at line 2488 of file plot.c.
References fplotter, NSERROR_OK, s_view::scale, plot_font_style::size, s_font_plotter::text, text(), and view.
bool plot_unlock | ( | void | ) |
Definition at line 1791 of file plot.c.
References atari_plot_flags, atari_plot_vdi_handle, and PLOT_FLAG_LOCKED.
Referenced by atari_treeview_redraw(), plot_copy_rect(), and window_process_redraws().
|
static |
Fill the screen info structure.
vdih | The handle | |
[out] | info | The infor structure to fill. |
Definition at line 432 of file plot.c.
References s_vdi_sysinfo::clut, s_vdi_sysinfo::colors, EDDI_10, EDDI_11, EdDI_version(), s_vdi_sysinfo::EdDiVersion, s_vdi_sysinfo::hicolors, s_vdi_sysinfo::mask_a, s_vdi_sysinfo::mask_b, s_vdi_sysinfo::mask_g, s_vdi_sysinfo::mask_r, s_vdi_sysinfo::maxintin, s_vdi_sysinfo::maxpolycoords, s_vdi_sysinfo::pitch, s_vdi_sysinfo::pixelsize, s_vdi_sysinfo::rasterscale, s_vdi_sysinfo::scr_bpp, s_vdi_sysinfo::scr_h, s_vdi_sysinfo::scr_w, s_vdi_sysinfo::screen, s_vdi_sysinfo::screensize, tos_getcookie(), VDI_CLUT_HARDWARE, VDI_CLUT_NONE, VDI_CLUT_SOFTWARE, VDI_FORMAT_INTER, VDI_FORMAT_PACK, s_vdi_sysinfo::vdi_handle, s_vdi_sysinfo::vdiformat, vdih, and vq_scrninfo().
Referenced by dump_vdi_info(), and plot_init().
|
inline |
Convert an RGB color to an VDI Color.
Definition at line 564 of file plot.c.
Referenced by plot_init(), vsf_rgbcolor(), and vsl_rgbcolor().
|
static |
Create an snapshot of the screen in netsurf ABGR format.
This creates an snapshot in RGBA format (NetSurf's native format)
Capture the screen at x,y location
x | absolute screen coords |
y | absolute screen coords |
w | width |
h | height |
Definition at line 803 of file plot.c.
References atari_bitmap_create(), atari_bitmap_get_rowstride(), atari_bitmap_realloc(), BITMAP_GROW, bitmap::bpp, buf_scr_compat, bitmap::height, hermes_cnv_h, MFDB_STRIDE, bitmap::native, nsfmt, bitmap::pixdata, s_vdi_sysinfo::pixelsize, bitmap::rowstride, snapshot, snapshot_create_native_mfdb(), vdi_sysinfo, vfmt, and bitmap::width.
Referenced by bitmap_convert_tc().
|
static |
Create an snapshot of the screen image in device format.
Definition at line 742 of file plot.c.
References atari_plot_vdi_handle, buf_scr, init_mfdb(), MFDB_STRIDE, s_vdi_sysinfo::scr_bpp, size_buf_scr, and vdi_sysinfo.
Referenced by snapshot_create().
|
static |
destroy memory used by screenshot
Shut down the snapshot interface.
Definition at line 922 of file plot.c.
References atari_bitmap_destroy(), buf_scr, buf_scr_compat, and buf_std.
Referenced by plot_finalise().
|
static |
Garbage collection of the snapshot routine.
Notify the snapshot interface that the last snapshot is no longer in use.
this should be called after you are done with the data returned by snapshot_create don't access the screenshot after you called this function
Definition at line 877 of file plot.c.
References atari_bitmap_buffer_size(), atari_bitmap_realloc(), BITMAP_SHRINK, bitmap::bpp, buf_scr, buf_scr_compat, buf_std, CONV_KEEP_LIMIT, size_buf_scr, and size_buf_std.
Referenced by plot_blit_bitmap().
|
inlinestatic |
Definition at line 295 of file plot.c.
References common, s_view::h, s_vdi_sysinfo::scr_h, s_vdi_sysinfo::scr_w, vdi_sysinfo, view, s_view::vis_h, s_view::vis_w, s_view::vis_x, s_view::vis_y, s_view::w, s_view::x, and s_view::y.
Referenced by plot_init(), and plot_set_dimensions().
|
inline |
Definition at line 576 of file plot.c.
Referenced by plot_init().
void vq_scrninfo | ( | VdiHdl | handle, |
short * | work_out | ||
) |
|
inlinestatic |
Set fill color by passing netsurf XBGR "colour" type.
vdih | The vdi handle |
cin | The netsurf colour value |
Definition at line 255 of file plot.c.
References OFFSET_CUSTOM_COLOR, rgb_to_vdi1000(), s_vdi_sysinfo::scr_bpp, vdi_sysinfo, and vdih.
Referenced by plot_arc(), plot_disc(), plot_polygon(), and plot_rectangle().
|
inlinestatic |
Set line drawing color by passing netsurf XBGR "colour" type.
vdih | The vdi handle |
cin | The netsurf colour value |
Definition at line 228 of file plot.c.
References OFFSET_CUSTOM_COLOR, rgb_to_vdi1000(), s_vdi_sysinfo::scr_bpp, vdi_sysinfo, and vdih.
Referenced by plot_arc(), plot_line(), plot_polygon(), and plot_rectangle().
unsigned long atari_font_flags |
Definition at line 210 of file plot.c.
Referenced by plot_init().
|
static |
Definition at line 198 of file plot.c.
Referenced by bitmap_convert_tc(), and plot_init().
unsigned long atari_plot_flags |
Definition at line 209 of file plot.c.
Referenced by bitmap_convert_tc(), plot_get_flags(), plot_init(), plot_lock(), and plot_unlock().
VdiHdl atari_plot_vdi_handle = -1 |
Definition at line 208 of file plot.c.
Referenced by plot_arc(), plot_blit_bitmap(), plot_blit_mfdb(), plot_clip(), plot_copy_rect(), plot_disc(), plot_finalise(), plot_get_vdi_handle(), plot_init(), plot_line(), plot_polygon(), plot_rectangle(), plot_unlock(), and snapshot_create_native_mfdb().
const struct plotter_table atari_plotters |
atari plottr operation table
Definition at line 2507 of file plot.c.
Referenced by atari_treeview_redraw(), and gui_init().
|
static |
Definition at line 213 of file plot.c.
Referenced by plot_blit_bitmap(), and plot_init().
|
static |
Definition at line 170 of file plot.c.
Referenced by bitmap_convert_tc(), convert_bitmap_done(), plot_finalise(), and plot_init().
void* buf_planar |
Definition at line 174 of file plot.c.
Referenced by plot_finalise(), and plot_init().
|
static |
Definition at line 179 of file plot.c.
Referenced by snapshot_create_native_mfdb(), snapshot_destroy(), and snapshot_suspend().
struct bitmap* buf_scr_compat |
Definition at line 186 of file plot.c.
Referenced by snapshot_create(), snapshot_destroy(), and snapshot_suspend().
MFDB buf_std |
Definition at line 183 of file plot.c.
Referenced by snapshot_destroy(), and snapshot_suspend().
FONT_PLOTTER fplotter = NULL |
Definition at line 165 of file plot.c.
Referenced by atari_font_position(), atari_font_split(), atari_font_width(), new_font_plotter(), plot_finalise(), plot_get_text_plotter(), plot_init(), plot_set_text_plotter(), and plot_text().
|
static |
Definition at line 202 of file plot.c.
Referenced by bitmap_convert_tc(), plot_finalise(), plot_init(), and snapshot_create().
|
static |
Definition at line 203 of file plot.c.
Referenced by plot_bitmap(), and plot_init().
|
static |
Definition at line 194 of file plot.c.
Referenced by bitmap_convert_tc(), plot_bitmap(), plot_init(), and snapshot_create().
|
static |
Definition at line 158 of file plot.c.
Referenced by plot_err_str().
|
static |
Definition at line 171 of file plot.c.
Referenced by bitmap_convert_tc(), convert_bitmap_done(), and plot_init().
int size_buf_planar |
Definition at line 175 of file plot.c.
Referenced by plot_init().
|
static |
Definition at line 180 of file plot.c.
Referenced by snapshot_create_native_mfdb(), and snapshot_suspend().
int size_buf_std |
Definition at line 184 of file plot.c.
Referenced by snapshot_suspend().
|
static |
Definition at line 206 of file plot.c.
Referenced by llcache_object_snapshot(), and snapshot_create().
struct s_vdi_sysinfo vdi_sysinfo |
Definition at line 196 of file plot.c.
Referenced by fbrect_to_screen(), plot_clip(), plot_init(), plot_polygon(), snapshot_create(), snapshot_create_native_mfdb(), update_visible_rect(), vsf_rgbcolor(), and vsl_rgbcolor().
|
extern |
Referenced by dump_vdi_info(), read_vdi_sysinfo(), vsf_rgbcolor(), and vsl_rgbcolor().
|
static |
Definition at line 189 of file plot.c.
Referenced by bitmap_convert_tc(), plot_finalise(), plot_init(), and snapshot_create().
|
static |
Definition at line 199 of file plot.c.
Referenced by bitmap_render(), fbrect_to_screen(), NSBaseView::Instantiate(), nsbeos_attach_toplevel_view(), nsbeos_current_gc_lock(), nsbeos_current_gc_set(), nsbeos_dispatch_event(), nsbeos_plot_arc(), nsbeos_plot_bbitmap(), nsbeos_plot_bitmap(), nsbeos_plot_caret(), nsbeos_plot_clip(), nsbeos_plot_disc(), nsbeos_plot_line(), nsbeos_plot_path(), nsbeos_plot_polygon(), nsbeos_plot_rectangle(), nsbeos_set_colour(), nsbeos_window_expose_event(), nsbeos_window_moved_event(), nsfont_paint(), nsgtk_burger_menu_create(), nsgtk_menu_initialise(), nsgtk_menu_view_submenu(), plot_arc(), plot_bitmap(), plot_blit_bitmap(), plot_blit_mfdb(), plot_clip(), plot_copy_rect(), plot_disc(), plot_get_abs_clipping(), plot_get_abs_clipping_grect(), plot_get_clip(), plot_get_dimensions(), plot_get_scale(), plot_get_visible_grect(), plot_init(), plot_line(), plot_polygon(), plot_rectangle(), plot_set_abs_clipping(), plot_set_dimensions(), plot_set_scale(), plot_text(), and update_visible_rect().