GrafX2 2.9.3227
The ultimate 256-color painting program
graph.c File Reference
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "global.h"
#include "struct.h"
#include "engine.h"
#include "buttons.h"
#include "pages.h"
#include "errors.h"
#include "screen.h"
#include "graph.h"
#include "misc.h"
#include "osdep.h"
#include "pxsimple.h"
#include "pxtall.h"
#include "pxwide.h"
#include "pxdouble.h"
#include "pxtriple.h"
#include "pxwide2.h"
#include "pxtall2.h"
#include "pxtall3.h"
#include "pxquad.h"
#include "windows.h"
#include "input.h"
#include "brush.h"
#include "tiles.h"
+ Include dependency graph for graph.c:

Data Structures

struct  T_Ellipse_limits
 
struct  T_Polygon_edge
 

Macros

#define M_PI   3.141592653589793238462643
 
#define MAX(a, b)   (((a)>(b)) ? (a) : (b))
 
#define Display_line_on_screen_fast_simple   Display_line_on_screen_simple
 
#define SETPIXEL(x)
 
#define Display_line_on_screen_fast_tall   Display_line_on_screen_tall
 

Functions

void Set_Pixel_figure (Func_pixel func)
 All the figure-drawing functions work by calling this function for each pixel to draw. More...
 
static void Ellipse_compute_limites (short horizontal_radius, short vertical_radius, T_Ellipse_limits *Ellipse)
 
static byte Pixel_in_ellipse (long x, long y, const T_Ellipse_limits *Ellipse)
 
static byte Pixel_in_circle (long x, long y, long limit)
 
void Update_part_of_screen (short x, short y, short width, short height)
 Update the picture on screen, for the area passed in parameters. More...
 
void Transform_point (short x, short y, float cos_a, float sin_a, short *rx, short *ry)
 
int Init_mode_video (int width, int height, int fullscreen, int pix_ratio)
 
void Resize_image (word chosen_width, word chosen_height)
 
void Remap_spare (void)
 Remap the spare page according to the main page's palette. More...
 
void Get_colors_from_brush (void)
 Get color indexes used by the brush. More...
 
void Fill (short *top_reached, short *bottom_reached, short *left_reached, short *right_reached)
 
byte Read_pixel_from_backup_layer (word x, word y)
 
void Fill_general (byte fill_color)
 
void Init_permanent_draw (void)
 
void Pixel_figure_permanent (word x_pos, word y_pos, byte color)
 
void Pixel_clipped (word x_pos, word y_pos, byte color)
 
void Pixel_figure_preview (word x_pos, word y_pos, byte color)
 
void Pixel_figure_preview_auto (word x_pos, word y_pos)
 
void Pixel_figure_preview_xor (word x_pos, word y_pos, byte color)
 
void Pixel_figure_preview_xorback (word x_pos, word y_pos, byte color)
 
void Pixel_figure_clear_preview (word x_pos, word y_pos, byte color)
 
void Pixel_figure_in_brush (word x_pos, word y_pos, byte color)
 
void Draw_empty_circle_general (short center_x, short center_y, long sqradius, byte color)
 
void Draw_empty_circle_permanent (short center_x, short center_y, long sqradius, byte color)
 
void Draw_empty_circle_preview (short center_x, short center_y, long sqradius, byte color)
 
void Hide_empty_circle_preview (short center_x, short center_y, long sqradius)
 
void Draw_filled_circle (short center_x, short center_y, long sqradius, byte color)
 
int Circle_squared_diameter (int diameter)
 
static void Draw_empty_ellipse_general (short center_x, short center_y, short horizontal_radius, short vertical_radius, byte color)
 
static void Draw_inscribed_ellipse_general (short x1, short y1, short x2, short y2, byte color, byte filled)
 
void Draw_empty_ellipse_permanent (short center_x, short center_y, short horizontal_radius, short vertical_radius, byte color)
 
void Draw_empty_inscribed_ellipse_permanent (short x1, short y1, short x2, short y2, byte color)
 
void Draw_empty_ellipse_preview (short center_x, short center_y, short horizontal_radius, short vertical_radius, byte color)
 
void Draw_empty_inscribed_ellipse_preview (short x1, short y1, short x2, short y2, byte color)
 
void Hide_empty_ellipse_preview (short center_x, short center_y, short horizontal_radius, short vertical_radius)
 
void Hide_empty_inscribed_ellipse_preview (short x1, short y1, short x2, short y2)
 
void Draw_filled_ellipse (short center_x, short center_y, short horizontal_radius, short vertical_radius, byte color)
 
void Draw_filled_inscribed_ellipse (short x1, short y1, short x2, short y2, byte color)
 
void Clamp_coordinates_regular_angle (short ax, short ay, short *bx, short *by)
 Alters bx and by so the (AX,AY)-(BX,BY) segment becomes either horizontal, vertical, 45degrees, or isometrical for pixelart (ie 2:1 ratio) More...
 
void Draw_line_general (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Draw_line_permanent (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Draw_line_preview (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Draw_line_preview_xor (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Draw_line_preview_xorback (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Hide_line_preview (short start_x, short start_y, short end_x, short end_y)
 
void Draw_empty_rectangle (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Draw_filled_rectangle (short start_x, short start_y, short end_x, short end_y, byte color)
 
void Draw_curve_general (short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, byte color)
 
void Draw_curve_permanent (short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, byte color)
 
void Draw_curve_preview (short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, byte color)
 
void Hide_curve_preview (short x1, short y1, short x2, short y2, short x3, short y3, short x4, short y4, byte color)
 
void Airbrush (short clicked_button)
 
void Gradient_basic (long index, short x_pos, short y_pos)
 
void Gradient_dithered (long index, short x_pos, short y_pos)
 
void Gradient_extra_dithered (long index, short x_pos, short y_pos)
 
void Draw_grad_circle (short center_x, short center_y, long sqradius, short spot_x, short spot_y)
 
void Draw_grad_ellipse (short center_x, short center_y, short horizontal_radius, short vertical_radius, short spot_x, short spot_y)
 
void Draw_grad_inscribed_ellipse (short x1, short y1, short x2, short y2, short spot_x, short spot_y)
 
void Draw_grad_rectangle (short rax, short ray, short rbx, short rby, short vax, short vay, short vbx, short vby)
 
void Fill_edge_structure (T_Polygon_edge *edge, short *i1, short *i2)
 
T_Polygon_edgeAdd_edge (T_Polygon_edge *list, T_Polygon_edge *edge, int sort_by_x)
 
T_Polygon_edgeRemove_edge (T_Polygon_edge *list, T_Polygon_edge *edge)
 
void Polyfill_general (int vertices, short *points, int color)
 
void Polyfill (int vertices, short *points, int color)
 
void Replace (byte new_color)
 
void Shade_list_to_lookup_tables (word *list, short step, byte mode, byte *table_inc, byte *table_dec)
 
void Display_pixel (word x, word y, byte color)
 
byte No_effect (word x, word y, byte color)
 
byte Effect_shade (word x, word y, byte color)
 
byte Effect_quick_shade (word x, word y, byte color)
 
byte Effect_tiling (word x, word y, byte color)
 
byte Effect_smooth (word x, word y, byte color)
 
byte Effect_layer_copy (word x, word y, byte color)
 
void Horizontal_grid_line (word x_pos, word y_pos, word width)
 
void Vertical_grid_line (word x_pos, word y_pos, word height)
 
void Redraw_grid (short x, short y, unsigned short w, unsigned short h)
 
byte Read_pixel_from_current_screen (word x, word y)
 
static void Pixel_in_screen_direct_with_opt_preview (word x, word y, byte color, int preview)
 Paint a a single pixel in image and optionnaly on screen: as-is. More...
 
static void Pixel_in_screen_layered_with_opt_preview (word x, word y, byte color, int preview)
 Paint a a single pixel in image and on optionnaly on screen : using layered display. More...
 
static void Pixel_in_layer_with_opt_preview (int layer, word x, word y, byte color, int preview)
 Paint in a specific layer and update optionnaly the screen. More...
 
static void Pixel_in_screen_egx_with_opt_preview (word x, word y, byte color, int preview)
 Paint a pixel in CPC EGX mode. More...
 
static void Pixel_in_screen_thomson_with_opt_preview (word x, word y, byte color, int preview)
 Paint a pixel in 40col Thomson MO/TO mode or TMS9918 Graphics 2. More...
 
static void Pixel_in_screen_zx_with_opt_preview (word x, word y, byte color, int preview)
 Paint a pixel with 8x8 block constraints. More...
 
static void Pixel_in_screen_gbc_with_opt_preview (word x, word y, byte color, int preview)
 Paint a pixel with GBC constraints. More...
 
static void Pixel_in_screen_c64multi_with_opt_preview (word x, word y, byte color, int preview)
 Paint a pixel with C64 MultiColor constraints. More...
 
static void Pixel_in_screen_c64fli_underlay_with_opt_preview (word x, word y, byte color, int preview)
 Paint in the background or Color RAM layer of C64 FLI. More...
 
static void Pixel_in_screen_c64fli_bitmap_with_opt_preview (word x, word y, byte color, int preview)
 Paint in the bitmap layer of C64 FLI. More...
 
static void Pixel_in_screen_underlay_with_opt_preview (word x, word y, byte color, int preview)
 Paint a a single pixel in image and optionnaly on screen : in a layer under one that acts as a layer-selector (mode 5). More...
 
static void Pixel_in_screen_overlay_with_opt_preview (word x, word y, byte color, int preview)
 Paint a single pixel in the layer 5 of CPC rasterized modes. More...
 
void Update_color_hgr_pixel (word x, word y, int preview)
 generate color pixels in layer 2 from the monochrome layer 1 More...
 
static void Pixel_in_screen_hgr_mono_with_opt_preview (word x, word y, byte color, int preview)
 Paint a pixel in HGR mode in the monochrome layer. More...
 
static void Pixel_in_screen_hgr_color_with_opt_preview (word x, word y, byte color, int preview)
 Paint in the color layer of HGR. More...
 
void Update_color_dhgr_pixel (word x, word y, int preview)
 Update the color layer of DHGR according to the monochrome layer. More...
 
static void Pixel_in_screen_dhgr_mono_with_opt_preview (word x, word y, byte color, int preview)
 Paint in the monochrome layer of DHGR. More...
 
static void Pixel_in_screen_dhgr_color_with_opt_preview (word x, word y, byte color, int preview)
 Paint in the color layer of DHGR. More...
 
void Pixel_in_document_current_layer (T_Document *doc, word x, word y, byte color)
 Put a pixel in the current layer of a "Document". More...
 
void Pixel_in_spare (word x, word y, byte color)
 
void Pixel_in_current_layer (word x, word y, byte color)
 
void Pixel_in_layer (int layer, word x, word y, byte color)
 put a pixel in a specific layer of Main Page More...
 
byte Read_pixel_from_current_layer (word x, word y)
 
byte Read_pixel_from_layer (int layer, word x, word y)
 Read a pixel from a specific layer of Main Page. More...
 
void Update_pixel_renderer (void)
 Update the pixel functions according to the current Image_mode. More...
 

Variables

static Func_pixel Pixel_figure
 
static dword Permanent_draw_next_refresh =0
 
static int Permanent_draw_count =0
 
Func_pixel_opt_preview Pixel_in_current_screen_with_opt_preview =Pixel_in_screen_direct_with_opt_preview
 Paint a single pixel in image AND optionnaly on screen. More...
 

Macro Definition Documentation

◆ M_PI

#define M_PI   3.141592653589793238462643

◆ MAX

#define MAX (   a,
 
)    (((a)>(b)) ? (a) : (b))

◆ Display_line_on_screen_fast_simple

#define Display_line_on_screen_fast_simple   Display_line_on_screen_simple

◆ SETPIXEL

#define SETPIXEL (   x)
Value:
Pixel = Pixel_##x ; \
Read_pixel= Read_pixel_##x ; \
Display_screen = Display_part_of_screen_##x ; \
Block = Block_##x ; \
Pixel_preview_normal = Pixel_preview_normal_##x ; \
Pixel_preview_magnifier = Pixel_preview_magnifier_##x ; \
Horizontal_XOR_line = Horizontal_XOR_line_##x ; \
Vertical_XOR_line = Vertical_XOR_line_##x ; \
Display_brush_color = Display_brush_color_##x ; \
Display_brush_mono = Display_brush_mono_##x ; \
Clear_brush = Clear_brush_##x ; \
Remap_screen = Remap_screen_##x ; \
Display_line = Display_line_on_screen_##x ; \
Display_line_fast = Display_line_on_screen_fast_##x ; \
Read_line = Read_line_screen_##x ; \
Display_zoomed_screen = Display_part_of_screen_scaled_##x ; \
Display_brush_color_zoom = Display_brush_color_zoom_##x ; \
Display_brush_mono_zoom = Display_brush_mono_zoom_##x ; \
Clear_brush_scaled = Clear_brush_scaled_##x ; \
Display_brush = Display_brush_##x ;
GFX2_GLOBAL Func_pixel Pixel
On the screen, draw a point.
Definition: global.h:166

◆ Display_line_on_screen_fast_tall

#define Display_line_on_screen_fast_tall   Display_line_on_screen_tall

Function Documentation

◆ Set_Pixel_figure()

void Set_Pixel_figure ( Func_pixel  func)

All the figure-drawing functions work by calling this function for each pixel to draw.

Before calling these functions, you should assign Pixel_figure depending on what you where you want to draw:

References Pixel_figure.

Referenced by Capture_brush_with_lasso().

◆ Ellipse_compute_limites()

static void Ellipse_compute_limites ( short  horizontal_radius,
short  vertical_radius,
T_Ellipse_limits Ellipse 
)
static

◆ Pixel_in_ellipse()

◆ Pixel_in_circle()

static byte Pixel_in_circle ( long  x,
long  y,
long  limit 
)
static

◆ Update_part_of_screen()

void Update_part_of_screen ( short  x,
short  y,
short  width,
short  height 
)

Update the picture on screen, for the area passed in parameters.

Takes into account the X/Y scrolling and zoom, and performs all safety checks so no updates will go outside the display area.

References T_Document::image_height, T_Document::image_width, T_Document::magnifier_factor, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, Main, Menu_factor_X, Menu_Y, Min(), T_Document::offset_X, T_Document::offset_Y, Redraw_grid(), Screen_width, T_Document::separator_position, SEPARATOR_WIDTH, Show_grid, Snap_height, Snap_width, T_Document::tilemap_mode, Update_rect(), and T_Document::X_zoom.

Referenced by Capture_brush(), Capture_brush_with_lasso(), Curve_34_points_1_0(), Curve_34_points_2_0(), Display_paintbrush(), Distort_brush_1_0(), Draw_curve_cross(), Draw_curve_general(), Draw_empty_circle_permanent(), Draw_empty_circle_preview(), Draw_empty_ellipse_general(), Draw_empty_rectangle(), Draw_filled_circle(), Draw_filled_ellipse(), Draw_filled_rectangle(), Draw_grad_circle(), Draw_grad_ellipse(), Draw_grad_inscribed_ellipse(), Draw_grad_rectangle(), Draw_inscribed_ellipse_general(), Draw_line_permanent(), Draw_line_preview(), Draw_line_preview_xor(), Draw_line_preview_xorback(), Draw_paintbrush(), Draw_stretch_spot(), Filled_polyform_12_0(), Grad_circle_12_0(), Grad_ellipse_12_0(), Hide_empty_circle_preview(), Hide_line_preview(), Hide_paintbrush(), Line_12_0(), Polyfill(), Polyfill_12_0(), Polyfill_general(), Polygon_12_0(), Rotate_brush_preview(), and Stretch_brush_preview().

◆ Transform_point()

void Transform_point ( short  x,
short  y,
float  cos_a,
float  sin_a,
short *  rx,
short *  ry 
)

◆ Init_mode_video()

◆ Resize_image()

◆ Remap_spare()

◆ Get_colors_from_brush()

◆ Fill()

void Fill ( short *  top_reached,
short *  bottom_reached,
short *  left_reached,
short *  right_reached 
)

◆ Read_pixel_from_backup_layer()

◆ Fill_general()

◆ Init_permanent_draw()

◆ Pixel_figure_permanent()

◆ Pixel_clipped()

void Pixel_clipped ( word  x_pos,
word  y_pos,
byte  color 
)

◆ Pixel_figure_preview()

◆ Pixel_figure_preview_auto()

◆ Pixel_figure_preview_xor()

◆ Pixel_figure_preview_xorback()

void Pixel_figure_preview_xorback ( word  x_pos,
word  y_pos,
byte  color 
)

◆ Pixel_figure_clear_preview()

◆ Pixel_figure_in_brush()

void Pixel_figure_in_brush ( word  x_pos,
word  y_pos,
byte  color 
)

◆ Draw_empty_circle_general()

void Draw_empty_circle_general ( short  center_x,
short  center_y,
long  sqradius,
byte  color 
)

◆ Draw_empty_circle_permanent()

void Draw_empty_circle_permanent ( short  center_x,
short  center_y,
long  sqradius,
byte  color 
)

◆ Draw_empty_circle_preview()

void Draw_empty_circle_preview ( short  center_x,
short  center_y,
long  sqradius,
byte  color 
)

◆ Hide_empty_circle_preview()

void Hide_empty_circle_preview ( short  center_x,
short  center_y,
long  sqradius 
)

◆ Draw_filled_circle()

void Draw_filled_circle ( short  center_x,
short  center_y,
long  sqradius,
byte  color 
)

◆ Circle_squared_diameter()

int Circle_squared_diameter ( int  diameter)

Referenced by Set_paintbrush_size().

◆ Draw_empty_ellipse_general()

static void Draw_empty_ellipse_general ( short  center_x,
short  center_y,
short  horizontal_radius,
short  vertical_radius,
byte  color 
)
static

◆ Draw_inscribed_ellipse_general()

static void Draw_inscribed_ellipse_general ( short  x1,
short  y1,
short  x2,
short  y2,
byte  color,
byte  filled 
)
static

◆ Draw_empty_ellipse_permanent()

void Draw_empty_ellipse_permanent ( short  center_x,
short  center_y,
short  horizontal_radius,
short  vertical_radius,
byte  color 
)

◆ Draw_empty_inscribed_ellipse_permanent()

void Draw_empty_inscribed_ellipse_permanent ( short  x1,
short  y1,
short  x2,
short  y2,
byte  color 
)

◆ Draw_empty_ellipse_preview()

void Draw_empty_ellipse_preview ( short  center_x,
short  center_y,
short  horizontal_radius,
short  vertical_radius,
byte  color 
)

◆ Draw_empty_inscribed_ellipse_preview()

void Draw_empty_inscribed_ellipse_preview ( short  x1,
short  y1,
short  x2,
short  y2,
byte  color 
)

◆ Hide_empty_ellipse_preview()

void Hide_empty_ellipse_preview ( short  center_x,
short  center_y,
short  horizontal_radius,
short  vertical_radius 
)

◆ Hide_empty_inscribed_ellipse_preview()

void Hide_empty_inscribed_ellipse_preview ( short  x1,
short  y1,
short  x2,
short  y2 
)

◆ Draw_filled_ellipse()

void Draw_filled_ellipse ( short  center_x,
short  center_y,
short  horizontal_radius,
short  vertical_radius,
byte  color 
)

◆ Draw_filled_inscribed_ellipse()

void Draw_filled_inscribed_ellipse ( short  x1,
short  y1,
short  x2,
short  y2,
byte  color 
)

◆ Clamp_coordinates_regular_angle()

void Clamp_coordinates_regular_angle ( short  ax,
short  ay,
short *  bx,
short *  by 
)

Alters bx and by so the (AX,AY)-(BX,BY) segment becomes either horizontal, vertical, 45degrees, or isometrical for pixelart (ie 2:1 ratio)

References M_PI.

Referenced by Grad_rectangle_12_9(), Line_12_5(), Rotate_brush_0_5(), and Rotate_brush_1_5().

◆ Draw_line_general()

void Draw_line_general ( short  start_x,
short  start_y,
short  end_x,
short  end_y,
byte  color 
)

◆ Draw_line_permanent()

void Draw_line_permanent ( short  start_x,
short  start_y,
short  end_x,
short  end_y,
byte  color 
)

◆ Draw_line_preview()

void Draw_line_preview ( short  start_x,
short  start_y,
short  end_x,
short  end_y,
byte  color 
)

◆ Draw_line_preview_xor()

◆ Draw_line_preview_xorback()

void Draw_line_preview_xorback ( short  start_x,
short  start_y,
short  end_x,
short  end_y,
byte  color 
)

◆ Hide_line_preview()

◆ Draw_empty_rectangle()

void Draw_empty_rectangle ( short  start_x,
short  start_y,
short  end_x,
short  end_y,
byte  color 
)

◆ Draw_filled_rectangle()

void Draw_filled_rectangle ( short  start_x,
short  start_y,
short  end_x,
short  end_y,
byte  color 
)

◆ Draw_curve_general()

void Draw_curve_general ( short  x1,
short  y1,
short  x2,
short  y2,
short  x3,
short  y3,
short  x4,
short  y4,
byte  color 
)

◆ Draw_curve_permanent()

void Draw_curve_permanent ( short  x1,
short  y1,
short  x2,
short  y2,
short  x3,
short  y3,
short  x4,
short  y4,
byte  color 
)

◆ Draw_curve_preview()

void Draw_curve_preview ( short  x1,
short  y1,
short  x2,
short  y2,
short  x3,
short  y3,
short  x4,
short  y4,
byte  color 
)

◆ Hide_curve_preview()

void Hide_curve_preview ( short  x1,
short  y1,
short  x2,
short  y2,
short  x3,
short  y3,
short  x4,
short  y4,
byte  color 
)

◆ Airbrush()

◆ Gradient_basic()

void Gradient_basic ( long  index,
short  x_pos,
short  y_pos 
)

◆ Gradient_dithered()

void Gradient_dithered ( long  index,
short  x_pos,
short  y_pos 
)

◆ Gradient_extra_dithered()

void Gradient_extra_dithered ( long  index,
short  x_pos,
short  y_pos 
)

◆ Draw_grad_circle()

void Draw_grad_circle ( short  center_x,
short  center_y,
long  sqradius,
short  spot_x,
short  spot_y 
)

◆ Draw_grad_ellipse()

void Draw_grad_ellipse ( short  center_x,
short  center_y,
short  horizontal_radius,
short  vertical_radius,
short  spot_x,
short  spot_y 
)

◆ Draw_grad_inscribed_ellipse()

void Draw_grad_inscribed_ellipse ( short  x1,
short  y1,
short  x2,
short  y2,
short  spot_x,
short  spot_y 
)

◆ Draw_grad_rectangle()

void Draw_grad_rectangle ( short  rax,
short  ray,
short  rbx,
short  rby,
short  vax,
short  vay,
short  vbx,
short  vby 
)

◆ Fill_edge_structure()

void Fill_edge_structure ( T_Polygon_edge edge,
short *  i1,
short *  i2 
)

◆ Add_edge()

◆ Remove_edge()

T_Polygon_edge * Remove_edge ( T_Polygon_edge list,
T_Polygon_edge edge 
)

◆ Polyfill_general()

◆ Polyfill()

◆ Replace()

◆ Shade_list_to_lookup_tables()

void Shade_list_to_lookup_tables ( word list,
short  step,
byte  mode,
byte table_inc,
byte table_dec 
)

◆ Display_pixel()

◆ No_effect()

◆ Effect_shade()

byte Effect_shade ( word  x,
word  y,
byte  color 
)

◆ Effect_quick_shade()

◆ Effect_tiling()

byte Effect_tiling ( word  x,
word  y,
byte  color 
)

◆ Effect_smooth()

◆ Effect_layer_copy()

byte Effect_layer_copy ( word  x,
word  y,
byte  color 
)

◆ Horizontal_grid_line()

void Horizontal_grid_line ( word  x_pos,
word  y_pos,
word  width 
)

◆ Vertical_grid_line()

void Vertical_grid_line ( word  x_pos,
word  y_pos,
word  height 
)

◆ Redraw_grid()

◆ Read_pixel_from_current_screen()

◆ Pixel_in_screen_direct_with_opt_preview()

static void Pixel_in_screen_direct_with_opt_preview ( word  x,
word  y,
byte  color,
int  preview 
)
static

Paint a a single pixel in image and optionnaly on screen: as-is.

References Pixel_in_current_layer(), Pixel_preview, and T_Polygon_edge::x.

Referenced by Update_pixel_renderer().

◆ Pixel_in_screen_layered_with_opt_preview()

◆ Pixel_in_layer_with_opt_preview()

◆ Pixel_in_document_current_layer()

void Pixel_in_document_current_layer ( T_Document doc,
word  x,
word  y,
byte  color 
)

Put a pixel in the current layer of a "Document".

Parameters
docpointer to either Main or Spare
xx coordinate of the pixel to put
yy coordinate of the pixel to put
colorthe new color for the pixel

References T_Document::backups, T_Document::current_layer, T_Page::Image, T_Document::image_width, T_List_of_pages::Pages, T_Image::Pixels, and T_Polygon_edge::x.

Referenced by Pixel_in_current_layer(), and Pixel_in_spare().

◆ Pixel_in_spare()

void Pixel_in_spare ( word  x,
word  y,
byte  color 
)

◆ Pixel_in_current_layer()

◆ Pixel_in_layer()

◆ Read_pixel_from_current_layer()

◆ Read_pixel_from_layer()

◆ Update_pixel_renderer()

Variable Documentation

◆ Pixel_figure

◆ Permanent_draw_next_refresh

dword Permanent_draw_next_refresh =0
static

◆ Permanent_draw_count

int Permanent_draw_count =0
static

◆ Pixel_in_current_screen_with_opt_preview

Func_pixel_opt_preview Pixel_in_current_screen_with_opt_preview =Pixel_in_screen_direct_with_opt_preview

Paint a single pixel in image AND optionnaly on screen.

Referenced by Update_pixel_renderer().