NetSurf
|
Go to the source code of this file.
Data Structures | |
struct | s_vdi_sysinfo |
Macros | |
#define | CONV_KEEP_LIMIT 512000 |
how much memory should be kept allocated for temp. More... | |
#define | CONV_BLOCK_SIZE 32000 |
how much memory to allocate if some is needed: More... | |
#define | PLOT_FLAG_DITHER 0x04 |
set if the plotter shall dither images More... | |
#define | PLOT_FLAG_TRANS 0x08 |
set if the plotter supports transparent operations More... | |
#define | PLOT_FLAG_HAS_DITHER 0x0400 |
#define | PLOT_FLAG_HAS_ALPHA 0x0800 |
#define | PLOT_FLAG_OFFSCREEN 0x1000 |
offscreen plotter should set this flag More... | |
#define | PLOT_FLAG_LOCKED 0x08000 |
plotter should set this flag during screen updates More... | |
#define | FONTPLOT_FLAG_MONOGLYPH 0x01 |
#define | MFDB_FLAG_STAND 0x01 |
#define | MFDB_FLAG_ZEROMEM 0x02 |
#define | MFDB_FLAG_NOALLOC 0x04 |
#define | BITMAPF_MONOGLYPH 4096 |
The bitmap is an character bitmap. More... | |
#define | BITMAPF_BUFFER_NATIVE 8192 |
Bitmap shall be kept converted More... | |
#define | ERR_BUFFERSIZE_EXCEEDS_SCREEN 1 /* The buffer allocated is larger than the screen */ |
#define | ERR_NO_MEM 2 /* Not enough memory for requested operation */ |
#define | ERR_PLOTTER_NOT_AVAILABLE 3 /* invalid plotter driver name passed */ |
#define | NSLT2VDI(dst, src) |
#define | ABGR_TO_RGB(c) ( ((c&0xFF)<<16) | (c&0xFF00) | ((c&0xFF0000)>>16) ) << 8 |
#define | OFFSET_CUSTOM_COLOR 255 |
Functions | |
int | plot_init (const struct redraw_context *ctx, char *fdrvrname) |
Init screen and font driver objects. More... | |
int | plot_finalise (void) |
const char * | plot_err_str (int i) |
translate an error number More... | |
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_get_scale (void) |
float | plot_set_scale (float) |
set scale of plotter. More... | |
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... | |
bool | plot_get_clip (struct rect *out) |
void | plot_get_clip_grect (GRECT *out) |
Get clipping for current framebuffer as GRECT. More... | |
VdiHdl | plot_get_vdi_handle (void) |
long | plot_get_flags (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) |
bool | plot_copy_rect (GRECT src, GRECT dst) |
copy an rectangle from the plot buffer to screen More... | |
void | vdi1000_to_rgb (unsigned short *in, unsigned char *out) |
void | rgb_to_vdi1000 (unsigned char *in, RGB1000 *out) |
Convert an RGB color to an VDI Color. More... | |
short | rgb_to_666_index (unsigned char r, unsigned char g, unsigned char b) |
Variables | |
const struct plotter_table | atari_plotters |
atari plottr operation table More... | |
#define ABGR_TO_RGB | ( | c | ) | ( ((c&0xFF)<<16) | (c&0xFF00) | ((c&0xFF0000)>>16) ) << 8 |
#define BITMAPF_BUFFER_NATIVE 8192 |
#define BITMAPF_MONOGLYPH 4096 |
#define CONV_BLOCK_SIZE 32000 |
#define CONV_KEEP_LIMIT 512000 |
#define ERR_BUFFERSIZE_EXCEEDS_SCREEN 1 /* The buffer allocated is larger than the screen */ |
#define ERR_NO_MEM 2 /* Not enough memory for requested operation */ |
#define ERR_PLOTTER_NOT_AVAILABLE 3 /* invalid plotter driver name passed */ |
#define NSLT2VDI | ( | dst, | |
src | |||
) |
#define PLOT_FLAG_DITHER 0x04 |
#define PLOT_FLAG_LOCKED 0x08000 |
#define PLOT_FLAG_OFFSCREEN 0x1000 |
#define PLOT_FLAG_TRANS 0x08 |
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.
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.
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().
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().
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().
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().
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().
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().
short rgb_to_666_index | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b | ||
) |
|
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().
|
inline |
Definition at line 576 of file plot.c.
Referenced by plot_init().
|
extern |
atari plottr operation table
Definition at line 2507 of file plot.c.
Referenced by atari_treeview_redraw(), and gui_init().