GrafX2 2.9.3227
The ultimate 256-color painting program
|
Graphic functions that target the screen and/or image. More...
Macros | |
#define | Pixel_in_current_screen(x, y, c) Pixel_in_current_screen_with_opt_preview(x,y,c,0) |
Paint a single pixel in image only. More... | |
#define | Pixel_in_current_screen_with_preview(x, y, c) Pixel_in_current_screen_with_opt_preview(x,y,c,1) |
Paint a single pixel in image AND on screen. More... | |
Functions | |
void | Shade_list_to_lookup_tables (word *list, short step, byte mode, byte *table_inc, byte *table_dec) |
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 pixel_ratio) |
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 | Display_foreback (void) |
void | Display_pixel (word x, word y, byte color) |
void | Display_paintbrush (short x, short y, byte color) |
Display the paintbrush (preview : on screen only) More... | |
void | Draw_paintbrush (short x, short y, byte color) |
Draw the paintbrush in the image buffer. More... | |
void | Hide_paintbrush (short x, short y) |
void | Resize_image (word chosen_width, word chosen_height) |
void | Fill_general (byte fill_color) |
void | Replace (byte New_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_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) |
void | Draw_empty_ellipse_permanent (short center_x, short center_y, short horizontal_radius, short vertical_radius, byte color) |
void | Draw_empty_ellipse_preview (short center_x, short center_y, short horizontal_radius, short vertical_radius, byte color) |
void | Hide_empty_ellipse_preview (short center_x, short center_y, short horizontal_radius, short vertical_radius) |
void | Draw_filled_ellipse (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_inscribed_ellipse_preview (short x1, short y1, short x2, short y2, byte color) |
void | Hide_empty_inscribed_ellipse_preview (short x1, short y1, short x2, short y2) |
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_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 | Degrade_aleatoire (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 | Polyfill_general (int vertices, short *points, int color) |
void | Polyfill (int vertices, short *points, int color) |
void | Remap_spare (void) |
Remap the spare page according to the main page's palette. More... | |
void | Set_Pixel_figure (Func_pixel func) |
All the figure-drawing functions work by calling this function for each pixel to draw. More... | |
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 | Redraw_grid (short x, short y, unsigned short w, unsigned short h) |
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_screen (word x, word y) |
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... | |
void | Update_color_hgr_pixel (word x, word y, int preview) |
generate color pixels in layer 2 from the monochrome layer 1 More... | |
void | Update_color_dhgr_pixel (word x, word y, int preview) |
Update the color layer of DHGR according to the monochrome layer. More... | |
Variables | |
Func_pixel_opt_preview | Pixel_in_current_screen_with_opt_preview |
Paint a single pixel in image AND optionnaly on screen. More... | |
Graphic functions that target the screen and/or image.
#define Pixel_in_current_screen | ( | x, | |
y, | |||
c | |||
) | Pixel_in_current_screen_with_opt_preview(x,y,c,0) |
Paint a single pixel in image only.
#define Pixel_in_current_screen_with_preview | ( | x, | |
y, | |||
c | |||
) | Pixel_in_current_screen_with_opt_preview(x,y,c,1) |
Paint a single pixel in image AND on screen.
void Shade_list_to_lookup_tables | ( | word * | list, |
short | step, | ||
byte | mode, | ||
byte * | table_inc, | ||
byte * | table_dec | ||
) |
References mode, SHADE_MODE_LOOP, and SHADE_MODE_NORMAL.
Referenced by Load_CFG(), Set_config_defaults(), and Shade_settings_menu().
void Transform_point | ( | short | x, |
short | y, | ||
float | cos_a, | ||
float | sin_a, | ||
short * | rx, | ||
short * | ry | ||
) |
References Round().
Referenced by Display_cursor(), Hide_cursor(), Rotate_brush(), and Rotate_brush_preview().
int Init_mode_video | ( | int | width, |
int | height, | ||
int | fullscreen, | ||
int | pixel_ratio | ||
) |
References Adjust_mouse_sensitivity(), Change_palette_cells(), Clear_border(), Compute_limits(), Compute_magnifier_data(), Compute_paintbrush_coordinates(), Config, Current_resolution, T_Video_mode::Fullscreen, GFX2_DEBUG, GFX2_Log(), GFX2_Set_mode(), T_Video_mode::Height, Horizontal_line_buffer, T_Document::image_height, T_Document::image_width, T_Document::magnifier_mode, Main, Max(), MC_Black, Menu_factor_X, Menu_factor_Y, Menu_height, Menu_is_visible, Menu_status_Y, Menu_Y, Min(), Mouse_X, Mouse_Y, Nb_video_modes, T_Document::offset_X, T_Document::offset_Y, T_Document::palette, PIXEL_DOUBLE, Pixel_height, Pixel_preview, Pixel_preview_magnifier, Pixel_preview_normal, PIXEL_QUAD, Pixel_ratio, PIXEL_SIMPLE, PIXEL_TALL, PIXEL_TALL2, PIXEL_TALL3, PIXEL_TRIPLE, PIXEL_WIDE, PIXEL_WIDE2, Pixel_width, Position_screen_according_to_zoom(), T_Config::Ratio, render_scale_x, render_scale_y, Resize_height, Resize_width, Screen_height, Screen_width, Set_mouse_position(), Set_palette(), SETPIXEL, Spare, Verbose_message(), Video_mode, and T_Video_mode::Width.
Referenced by Button_Reload(), Button_Resolution(), Button_Safety_resolution(), Init_program(), Load_picture(), and Main_handler().
References T_Polygon_edge::x.
Referenced by Button_Colorize_mode(), Button_Quick_shade_mode(), Button_Shade_mode(), Button_Smear_mode(), Button_Smooth_mode(), Button_Tiling_mode(), Effects_off(), and Init_program().
References Read_pixel_from_feedback_screen(), Shade_table, and T_Polygon_edge::x.
Referenced by Button_Shade_mode().
References Back_color, Fore_color, Quick_shade_loop, Quick_shade_step, Read_pixel_from_feedback_screen(), SHADE_MODE_LOOP, SHADE_MODE_NORMAL, Shade_table, Shade_table_left, Shade_table_right, and T_Polygon_edge::x.
Referenced by Button_Quick_shade_mode().
References Brush_height, Brush_width, Read_pixel_from_brush(), Tiling_offset_X, Tiling_offset_Y, and T_Polygon_edge::x.
Referenced by Button_Tiling_mode().
References Read_pixel_from_feedback_screen(), Read_pixel_from_layer(), and T_Polygon_edge::x.
void Display_foreback | ( | void | ) |
References Back_color, Block, Fore_color, Menu_bars, Menu_factor_X, Menu_factor_Y, Menu_is_visible, MENU_WIDTH, Menu_Y, MENUBAR_TOOLS, and Update_rect().
Referenced by Button_Invert_foreback(), Display_menu(), Set_back_color(), and Set_fore_color().
References Effect_function, Effect_sieve(), Main, Mask_mode, Mask_table, Pixel_in_current_screen_with_preview, Read_pixel_from_current_layer(), Read_pixel_from_spare_screen(), Sieve_mode, Stencil, Stencil_mode, Tilemap_draw(), T_Document::tilemap_mode, and T_Polygon_edge::x.
Referenced by Button_Gradients(), Draw_filled_circle(), Draw_filled_ellipse(), Draw_filled_rectangle(), Draw_paintbrush(), Fill_general(), Init_program(), and Pixel_clipped().
void Display_paintbrush | ( | short | x, |
short | y, | ||
byte | color | ||
) |
Display the paintbrush (preview : on screen only)
References Back_color, T_Document::backups, Brush, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_width, Compute_clipped_dimensions(), Compute_clipped_dimensions_zoom(), T_Document::current_layer, Display_brush_color, Display_brush_color_zoom, Display_brush_mono, Display_brush_mono_zoom, Fore_color, Horizontal_line_buffer, T_Page::Image_mode, IMAGE_MODE_C64FLI, IMAGE_MODE_MODE5, IMAGE_MODE_RASTER, Limit_bottom, Limit_left, Limit_right, Limit_top, T_Document::magnifier_factor, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, Main, MAX_PAINTBRUSH_SIZE, Menu_Y, Mouse_K, T_Document::offset_X, T_Document::offset_Y, T_List_of_pages::Pages, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MONO_BRUSH, PAINTBRUSH_SHAPE_NONE, PAINTBRUSH_SHAPE_POINT, Paintbrush_sprite, Paintbrush_width, Paintbrush_X, Paintbrush_Y, Pixel_preview, Update_part_of_screen(), and T_Document::X_zoom.
Referenced by Display_cursor().
void Draw_paintbrush | ( | short | x, |
short | y, | ||
byte | color | ||
) |
Draw the paintbrush in the image buffer.
References Back_color, T_Document::backups, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_width, Clear_brush, Clear_brush_scaled, Compute_clipped_dimensions(), Compute_clipped_dimensions_zoom(), Copy_part_of_image_to_another(), T_Document::current_layer, Display_pixel(), Effect_function, Horizontal_line_buffer, T_Document::image_height, T_Page::Image_mode, IMAGE_MODE_C64FLI, IMAGE_MODE_MODE5, IMAGE_MODE_RASTER, T_Document::image_width, T_Document::magnifier_factor, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, Main, Main_screen, Mask_mode, Mask_table, MAX_PAINTBRUSH_SIZE, Menu_Y, T_Document::offset_X, T_Document::offset_Y, T_List_of_pages::Pages, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MONO_BRUSH, PAINTBRUSH_SHAPE_NONE, PAINTBRUSH_SHAPE_POINT, Paintbrush_sprite, Paintbrush_width, Pixel_in_current_screen, Read_pixel_from_brush(), Read_pixel_from_current_layer(), Read_pixel_from_current_screen(), Read_pixel_from_spare_screen(), Shade_table, Shade_table_left, Smear_brush, Smear_brush_width, Smear_max_X, Smear_max_Y, Smear_min_X, Smear_min_Y, Smear_mode, Smear_start, Stencil, Stencil_mode, Update_part_of_screen(), and T_Document::X_zoom.
Referenced by Airbrush(), Centered_lines_12_7(), Freehand_mode1_1_0(), Freehand_mode1_2_0(), Freehand_mode2_1_0(), Freehand_mode2_1_2(), Freehand_mode2_2_0(), Freehand_mode2_2_2(), Freehand_mode3_1_0(), Freehand_Mode3_2_0(), K_line_0_6(), Line_0_5(), Pixel_figure_permanent(), and Polyform_12_0().
void Hide_paintbrush | ( | short | x, |
short | y | ||
) |
References Back_color, Brush, Brush_height, Brush_offset_X, Brush_offset_Y, Brush_width, Clear_brush, Clear_brush_scaled, Compute_clipped_dimensions(), Compute_clipped_dimensions_zoom(), Horizontal_line_buffer, T_Document::image_width, Limit_bottom, Limit_left, Limit_right, Limit_top, T_Document::magnifier_factor, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, Main, Menu_Y, Mouse_K, T_Document::offset_X, T_Document::offset_Y, Paintbrush_height, Paintbrush_offset_X, Paintbrush_offset_Y, Paintbrush_shape, PAINTBRUSH_SHAPE_COLOR_BRUSH, PAINTBRUSH_SHAPE_MONO_BRUSH, PAINTBRUSH_SHAPE_POINT, Paintbrush_sprite, Paintbrush_width, Paintbrush_X, Paintbrush_Y, Pixel_preview, Read_pixel_from_current_screen(), Update_part_of_screen(), and T_Document::X_zoom.
Referenced by Hide_cursor().
References Backup_with_new_dimensions(), T_Document::backups, Copy_part_of_image_to_another(), Display_cursor(), Hide_cursor, T_Page::Image, T_Document::image_height, T_Document::image_is_modified, T_Document::image_width, Main, Message_out_of_memory(), Min(), T_Page::Nb_layers, T_Page::Next, T_List_of_pages::Pages, T_Image::Pixels, Redraw_layered_image(), and Upload_infos_page().
Referenced by Button_Constraint_menu(), and Button_Resolution().
void Fill_general | ( | byte | fill_color | ) |
References Backup(), T_Document::backups, Config, Copy_part_of_image_to_another(), T_Document::current_layer, Cursor_shape, CURSOR_SHAPE_HOURGLASS, Display_cursor(), Display_pixel(), End_of_modification(), Fill(), T_Config::FX_Feedback, Hide_cursor, T_Page::Image, T_Document::image_height, T_Document::image_width, Limit_bottom, Limit_left, Limit_right, Limit_top, T_Document::magnifier_factor, T_Document::magnifier_mode, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, Main, Max(), Menu_Y, Min(), T_Page::Next, T_List_of_pages::Pages, Paintbrush_X, Paintbrush_Y, Pixel_in_current_screen, T_Image::Pixels, Read_pixel_from_backup_layer(), Read_pixel_from_current_layer(), Redraw_grid(), Replace_colors_within_limits(), Screen_width, Snap_height, Snap_offset_X, Snap_offset_Y, Snap_width, T_Document::tilemap_mode, Update_FX_feedback(), Update_rect(), and T_Document::X_zoom.
Referenced by Fill_1_0(), and Fill_2_0().
void Replace | ( | byte | New_color | ) |
References T_Document::image_height, T_Document::image_width, Main, Paintbrush_X, Paintbrush_Y, Pixel_in_current_screen, Read_pixel_from_current_layer(), Stencil, Stencil_mode, and T_Polygon_edge::x.
Referenced by Replace_1_0(), and Replace_2_0().
References Limit_bottom, Limit_left, Limit_right, Limit_top, and Pixel_preview.
Referenced by Centered_lines_0_3(), Centered_lines_0_7(), Centered_lines_12_7(), Curve_34_points_1_0(), Curve_34_points_1_5(), Curve_34_points_2_0(), Curve_34_points_2_5(), Distort_brush_preview(), Draw_curve_preview(), Draw_empty_circle_preview(), Draw_empty_ellipse_preview(), Draw_empty_inscribed_ellipse_preview(), Draw_line_preview(), Grad_circle_12_0(), Grad_ellipse_12_0(), K_line_12_0(), K_line_12_6(), Line_12_0(), Line_12_5(), Polyform_12_0(), Polyform_12_8(), and Polygon_12_0().
References Limit_bottom, Limit_left, Limit_right, Limit_top, Pixel_preview, and Read_pixel_from_current_screen().
Referenced by Centered_lines_12_7(), K_line_0_6(), K_line_12_7(), Line_0_5(), Polyform_12_8(), and Polygon_12_9().
References Limit_bottom, Limit_left, Limit_right, Limit_top, Main, T_Document::offset_X, T_Document::offset_Y, Pixel_preview, Read_pixel, and xor_lut.
Referenced by Display_cursor(), Draw_line_preview_xor(), Filled_polyform_12_0(), Hide_cursor(), and Polyfill_12_0().
References T_Document::image_width, Limit_bottom, Limit_left, Limit_right, Limit_top, Main, Main_screen, Pixel_preview, and xor_lut.
Referenced by Draw_line_preview_xorback().
References Brush_height, Brush_offset_X, Brush_offset_Y, Brush_width, and Pixel_in_brush().
Referenced by Capture_brush_with_lasso().
void Draw_empty_circle_general | ( | short | center_x, |
short | center_y, | ||
long | sqradius, | ||
byte | color | ||
) |
References Pixel_figure, and Pixel_in_circle().
Referenced by Draw_empty_circle_permanent(), Draw_empty_circle_preview(), and Hide_empty_circle_preview().
void Draw_empty_circle_permanent | ( | short | center_x, |
short | center_y, | ||
long | sqradius, | ||
byte | color | ||
) |
References Draw_empty_circle_general(), Init_permanent_draw(), Pixel_figure, Pixel_figure_permanent(), and Update_part_of_screen().
Referenced by Empty_circle_0_5().
void Draw_empty_circle_preview | ( | short | center_x, |
short | center_y, | ||
long | sqradius, | ||
byte | color | ||
) |
References Draw_empty_circle_general(), Pixel_figure, Pixel_figure_preview(), and Update_part_of_screen().
Referenced by Circle_12_5(), and Grad_circle_12_6().
void Hide_empty_circle_preview | ( | short | center_x, |
short | center_y, | ||
long | sqradius | ||
) |
References Draw_empty_circle_general(), Pixel_figure, Pixel_figure_clear_preview(), and Update_part_of_screen().
Referenced by Circle_12_5(), Empty_circle_0_5(), Filled_circle_0_5(), Grad_circle_0_6(), Grad_circle_12_6(), and Grad_circle_12_8().
void Draw_filled_circle | ( | short | center_x, |
short | center_y, | ||
long | sqradius, | ||
byte | color | ||
) |
References Display_pixel(), Limit_bottom, Limit_left, Limit_right, Limit_top, Pixel_in_circle(), and Update_part_of_screen().
Referenced by Filled_circle_0_5(), and Grad_circle_0_6().
int Circle_squared_diameter | ( | int | diameter | ) |
Referenced by Set_paintbrush_size().
void Draw_empty_ellipse_permanent | ( | short | center_x, |
short | center_y, | ||
short | horizontal_radius, | ||
short | vertical_radius, | ||
byte | color | ||
) |
References Draw_empty_ellipse_general(), Init_permanent_draw(), Pixel_figure, and Pixel_figure_permanent().
Referenced by Empty_ellipse_0_5().
void Draw_empty_ellipse_preview | ( | short | center_x, |
short | center_y, | ||
short | horizontal_radius, | ||
short | vertical_radius, | ||
byte | color | ||
) |
References Draw_empty_ellipse_general(), Pixel_figure, and Pixel_figure_preview().
Referenced by Ellipse_12_5(), and Grad_ellipse_12_6().
void Hide_empty_ellipse_preview | ( | short | center_x, |
short | center_y, | ||
short | horizontal_radius, | ||
short | vertical_radius | ||
) |
References Draw_empty_ellipse_general(), Pixel_figure, and Pixel_figure_clear_preview().
Referenced by Ellipse_12_5(), Empty_ellipse_0_5(), Filled_ellipse_0_5(), Grad_ellipse_0_6(), Grad_ellipse_12_6(), and Grad_ellipse_12_8().
void Draw_filled_ellipse | ( | short | center_x, |
short | center_y, | ||
short | horizontal_radius, | ||
short | vertical_radius, | ||
byte | color | ||
) |
References Display_pixel(), Ellipse_compute_limites(), Limit_bottom, Limit_left, Limit_right, Limit_top, Pixel_in_ellipse(), and Update_part_of_screen().
Referenced by Filled_ellipse_0_5(), and Grad_ellipse_0_6().
void Draw_empty_inscribed_ellipse_permanent | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
byte | color | ||
) |
References Draw_inscribed_ellipse_general(), Init_permanent_draw(), Pixel_figure, and Pixel_figure_permanent().
Referenced by Empty_ellipse_0_5().
void Draw_empty_inscribed_ellipse_preview | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
byte | color | ||
) |
References Draw_inscribed_ellipse_general(), Pixel_figure, and Pixel_figure_preview().
Referenced by Ellipse_12_5(), and Grad_ellipse_12_6().
void Hide_empty_inscribed_ellipse_preview | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2 | ||
) |
References Draw_inscribed_ellipse_general(), Pixel_figure, and Pixel_figure_clear_preview().
Referenced by Ellipse_12_5(), Empty_ellipse_0_5(), Filled_ellipse_0_5(), Grad_ellipse_0_6(), Grad_ellipse_12_6(), and Grad_ellipse_12_8().
void Draw_filled_inscribed_ellipse | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
byte | color | ||
) |
References Draw_inscribed_ellipse_general(), Pixel_clipped(), and Pixel_figure.
Referenced by Filled_ellipse_0_5(), and Grad_ellipse_0_6().
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().
void Draw_line_general | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Pixel_figure.
Referenced by Capture_brush_with_lasso(), Draw_curve_general(), Draw_line_permanent(), Draw_line_preview(), Draw_line_preview_xor(), Draw_line_preview_xorback(), Hide_line_preview(), and Polyfill().
void Draw_line_permanent | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Draw_line_general(), Init_permanent_draw(), Pixel_figure, Pixel_figure_permanent(), and Update_part_of_screen().
Referenced by Centered_lines_12_7(), Freehand_mode1_1_2(), Freehand_mode1_2_2(), K_line_0_6(), Line_0_5(), Polyform_12_8(), and Polygon_12_9().
void Draw_line_preview | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Draw_line_general(), Pixel_figure, Pixel_figure_preview(), and Update_part_of_screen().
Referenced by Centered_lines_0_7(), Centered_lines_12_7(), Curve_34_points_1_5(), Curve_34_points_2_5(), K_line_12_6(), Line_12_5(), and Polyform_0_8().
void Draw_line_preview_xor | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Draw_line_general(), Limit_left, Limit_top, Pixel_figure, Pixel_figure_preview_xor(), and Update_part_of_screen().
Referenced by Display_cursor(), Filled_polyform_0_8(), Filled_polyform_12_8(), Grad_rectangle_12_9(), Hide_cursor(), Polybrush_12_8(), Polyfill_0_8(), Polyfill_12_8(), and Polyfill_12_9().
void Draw_line_preview_xorback | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Draw_line_general(), Pixel_figure, Pixel_figure_preview_xorback(), and Update_part_of_screen().
Referenced by Filled_polyform_12_8().
void Hide_line_preview | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y | ||
) |
References Draw_line_general(), Pixel_figure, Pixel_figure_clear_preview(), and Update_part_of_screen().
Referenced by Centered_lines_0_7(), Centered_lines_12_7(), Curve_34_points_1_5(), Curve_34_points_2_5(), Curve_3_points_0_5(), Curve_4_points_0_5(), Grad_rectangle_0_9(), K_line_0_6(), K_line_12_6(), K_line_12_7(), Line_0_5(), Line_12_5(), Polyform_0_8(), Polyform_12_8(), and Polygon_12_9().
void Draw_empty_rectangle | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Init_permanent_draw(), Pixel_figure_permanent(), and Update_part_of_screen().
Referenced by Empty_rectangle_0_5().
void Draw_filled_rectangle | ( | short | start_x, |
short | start_y, | ||
short | end_x, | ||
short | end_y, | ||
byte | color | ||
) |
References Display_pixel(), Limit_bottom, Limit_right, and Update_part_of_screen().
Referenced by Filled_rectangle_0_5().
void Draw_curve_permanent | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
short | x3, | ||
short | y3, | ||
short | x4, | ||
short | y4, | ||
byte | color | ||
) |
References Draw_curve_general(), Init_permanent_draw(), Pixel_figure, and Pixel_figure_permanent().
Referenced by Curve_4_points_2_9(), and Curve_finalize().
void Draw_curve_preview | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
short | x3, | ||
short | y3, | ||
short | x4, | ||
short | y4, | ||
byte | color | ||
) |
References Draw_curve_general(), Pixel_figure, and Pixel_figure_preview().
Referenced by Curve_3_points_0_5(), Curve_4_points_0_5(), Curve_4_points_1_9(), and Curve_drag().
void Hide_curve_preview | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
short | x3, | ||
short | y3, | ||
short | x4, | ||
short | y4, | ||
byte | color | ||
) |
References Draw_curve_general(), Pixel_figure, and Pixel_figure_clear_preview().
Referenced by Curve_4_points_1_9(), Curve_4_points_2_9(), Curve_drag(), and Curve_finalize().
void Airbrush | ( | short | clicked_button | ) |
References Airbrush_mode, Airbrush_mono_flow, Airbrush_multi_flow, Airbrush_size, Back_color, Display_cursor(), Draw_paintbrush(), Fore_color, Hide_cursor, LEFT_SIDE, Paintbrush_X, and Paintbrush_Y.
Referenced by Airbrush_12_2(), Airbrush_1_0(), and Airbrush_2_0().
void Gradient_basic | ( | long | index, |
short | x_pos, | ||
short | y_pos | ||
) |
References Gradient_bounds_range, Gradient_is_inverted, Gradient_lower_bound, Gradient_pixel, Gradient_random_factor, Gradient_total_range, and Gradient_upper_bound.
Referenced by Init_program(), and Load_gradient_data().
void Gradient_dithered | ( | long | index, |
short | x_pos, | ||
short | y_pos | ||
) |
References Gradient_bounds_range, Gradient_is_inverted, Gradient_lower_bound, Gradient_pixel, Gradient_random_factor, Gradient_total_range, and Gradient_upper_bound.
Referenced by Load_gradient_data().
void Gradient_extra_dithered | ( | long | index, |
short | x_pos, | ||
short | y_pos | ||
) |
References Gradient_bounds_range, Gradient_is_inverted, Gradient_lower_bound, Gradient_pixel, Gradient_random_factor, Gradient_total_range, and Gradient_upper_bound.
Referenced by Load_gradient_data().
void Degrade_aleatoire | ( | 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 | ||
) |
References Gradient_function, Gradient_total_range, Limit_bottom, Limit_left, Limit_right, Limit_top, Pixel_in_circle(), and Update_part_of_screen().
Referenced by Grad_circle_12_8().
void Draw_grad_ellipse | ( | short | center_x, |
short | center_y, | ||
short | horizontal_radius, | ||
short | vertical_radius, | ||
short | spot_x, | ||
short | spot_y | ||
) |
References Ellipse_compute_limites(), Gradient_function, Gradient_total_range, Limit_bottom, Limit_left, Limit_right, Limit_top, Pixel_in_ellipse(), and Update_part_of_screen().
Referenced by Grad_ellipse_12_8().
void Draw_grad_inscribed_ellipse | ( | short | x1, |
short | y1, | ||
short | x2, | ||
short | y2, | ||
short | spot_x, | ||
short | spot_y | ||
) |
References Gradient_function, Gradient_total_range, Limit_bottom, Limit_left, Limit_right, Limit_top, MASK_CIRCLE_ELLIPSE, MODE_CIRCLE, Selected_circle_ellipse_mode, and Update_part_of_screen().
Referenced by Grad_ellipse_12_8().
void Draw_grad_rectangle | ( | short | rax, |
short | ray, | ||
short | rbx, | ||
short | rby, | ||
short | vax, | ||
short | vay, | ||
short | vbx, | ||
short | vby | ||
) |
References Gradient_function, Gradient_total_range, Limit_bottom, Limit_left, Limit_right, Limit_top, and Update_part_of_screen().
Referenced by Grad_rectangle_0_9().
void Polyfill_general | ( | int | vertices, |
short * | points, | ||
int | color | ||
) |
References Add_edge(), T_Polygon_edge::bottom, T_Polygon_edge::dx, Fill_edge_structure(), T_Document::image_width, Limit_bottom, Limit_left, Limit_right, Limit_top, Main, T_Polygon_edge::next, NULL, Pixel_figure, T_Polygon_edge::prev, Remove_edge(), T_Polygon_edge::top, Update_part_of_screen(), T_Polygon_edge::w, and T_Polygon_edge::x.
Referenced by Capture_brush_with_lasso(), and Polyfill().
void Polyfill | ( | int | vertices, |
short * | points, | ||
int | color | ||
) |
References Config, Draw_line_general(), T_Config::FX_Feedback, Pixel_clipped(), Pixel_figure, Polyfill_general(), Update_FX_feedback(), and Update_part_of_screen().
Referenced by Filled_contour_0_8(), Filled_polyform_12_8(), and Polyfill_12_9().
void Remap_spare | ( | void | ) |
Remap the spare page according to the main page's palette.
References T_Document::backups, Best_color_perceptual(), T_Page::Image, T_Document::image_height, T_Document::image_width, T_Page::Nb_layers, T_List_of_pages::Pages, T_Document::palette, T_Image::Pixels, Remap_general_lowlevel(), Spare, and T_Page::Transparent_color.
Referenced by Button_Copy_page().
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().
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().
void Redraw_grid | ( | short | x, |
short | y, | ||
unsigned short | w, | ||
unsigned short | h | ||
) |
References Horizontal_grid_line(), T_Document::magnifier_factor, T_Document::magnifier_offset_X, T_Document::magnifier_offset_Y, Main, Show_grid, Snap_height, Snap_offset_X, Snap_offset_Y, Snap_width, Vertical_grid_line(), T_Polygon_edge::w, T_Polygon_edge::x, and T_Document::X_zoom.
Referenced by Clear_brush_scaled_double(), Clear_brush_scaled_quad(), Clear_brush_scaled_simple(), Clear_brush_scaled_tall(), Clear_brush_scaled_tall2(), Clear_brush_scaled_tall3(), Clear_brush_scaled_triple(), Clear_brush_scaled_wide(), Clear_brush_scaled_wide2(), Display_brush_mono_zoom_double(), Display_brush_mono_zoom_quad(), Display_brush_mono_zoom_simple(), Display_brush_mono_zoom_tall(), Display_brush_mono_zoom_tall2(), Display_brush_mono_zoom_tall3(), Display_brush_mono_zoom_triple(), Display_brush_mono_zoom_wide(), Display_brush_mono_zoom_wide2(), Display_part_of_screen_scaled_double(), Display_part_of_screen_scaled_quad(), Display_part_of_screen_scaled_simple(), Display_part_of_screen_scaled_tall(), Display_part_of_screen_scaled_tall2(), Display_part_of_screen_scaled_tall3(), Display_part_of_screen_scaled_triple(), Display_part_of_screen_scaled_wide(), Display_part_of_screen_scaled_wide2(), Fill_general(), and Update_part_of_screen().
References Pixel_in_document_current_layer(), Spare, and T_Polygon_edge::x.
put a pixel in a specific layer of Main Page
References T_Document::backups, T_Page::Image, T_Document::image_width, Main, T_List_of_pages::Pages, T_Image::Pixels, and T_Polygon_edge::x.
Referenced by Button_Constraint_mode(), C64_pixels_to_FLI(), Check_block_constraints(), Convert_to_dhgr(), Convert_to_hgr(), Pixel_in_layer_with_opt_preview(), and Pixel_in_screen_c64fli_underlay_with_opt_preview().
References T_Document::backups, T_Document::current_layer, T_Bitmap::Image, T_Page::Image_mode, IMAGE_MODE_ANIMATION, IMAGE_MODE_MODE5, IMAGE_MODE_RASTER, T_Document::image_width, Main, Main_screen, Main_visible_image_depth_buffer, T_List_of_pages::Pages, Read_pixel_from_current_layer(), Read_pixel_from_layer(), T_Page::Transparent_color, and T_Polygon_edge::x.
Referenced by Colorpicker_1_1(), Colorpicker_2_1(), Draw_paintbrush(), Effect_smooth(), Hide_paintbrush(), Pixel_figure_clear_preview(), Pixel_figure_preview_auto(), Print_coordinates(), and Rightclick_colorpick_2_1().
References T_Document::current_layer, Main, Read_pixel_from_layer(), and T_Polygon_edge::x.
Referenced by Capture_brush_with_lasso(), Display_pixel(), Draw_paintbrush(), Fill(), Fill_general(), Pixel_in_screen_c64fli_bitmap_with_opt_preview(), Pixel_in_screen_c64fli_underlay_with_opt_preview(), Pixel_in_screen_c64multi_with_opt_preview(), Pixel_in_screen_gbc_with_opt_preview(), Pixel_in_screen_thomson_with_opt_preview(), Pixel_in_screen_zx_with_opt_preview(), Read_pixel_from_current_screen(), and Replace().
Read a pixel from a specific layer of Main Page.
References T_Document::backups, T_Page::Image, T_Document::image_width, Main, T_List_of_pages::Pages, T_Image::Pixels, and T_Polygon_edge::x.
Referenced by Button_Constraint_mode(), Check_block_constraints(), Convert_to_dhgr(), Convert_to_hgr(), Effect_layer_copy(), Layer_preview_on(), Pixel_in_layer_with_opt_preview(), Pixel_in_screen_c64fli_bitmap_with_opt_preview(), Pixel_in_screen_c64fli_underlay_with_opt_preview(), Pixel_in_screen_dhgr_color_with_opt_preview(), Pixel_in_screen_dhgr_mono_with_opt_preview(), Pixel_in_screen_hgr_color_with_opt_preview(), Pixel_in_screen_hgr_mono_with_opt_preview(), Pixel_in_screen_layered_with_opt_preview(), Pixel_in_screen_overlay_with_opt_preview(), Pixel_in_screen_underlay_with_opt_preview(), Read_pixel_from_current_layer(), Read_pixel_from_current_screen(), Update_color_dhgr_pixel(), and Update_color_hgr_pixel().
void Update_pixel_renderer | ( | void | ) |
Update the pixel functions according to the current Image_mode.
Sets Pixel_in_current_screen and Pixel_in_current_screen_with_preview through Pixel_in_current_screen_with_opt_preview
References T_Document::backups, T_Document::current_layer, T_Page::Image_mode, IMAGE_MODE_ANIMATION, IMAGE_MODE_C64FLI, IMAGE_MODE_C64HIRES, IMAGE_MODE_C64MULTI, IMAGE_MODE_DHGR, IMAGE_MODE_EGX, IMAGE_MODE_EGX2, IMAGE_MODE_GBC, IMAGE_MODE_HGR, IMAGE_MODE_LAYERED, IMAGE_MODE_MEGADRIVE, IMAGE_MODE_MODE5, IMAGE_MODE_RASTER, IMAGE_MODE_THOMSON, IMAGE_MODE_TMS9918G2, IMAGE_MODE_ZX, T_Document::layers_visible, Main, T_List_of_pages::Pages, Pixel_in_current_screen_with_opt_preview, Pixel_in_screen_c64fli_bitmap_with_opt_preview(), Pixel_in_screen_c64fli_underlay_with_opt_preview(), Pixel_in_screen_c64multi_with_opt_preview(), Pixel_in_screen_dhgr_color_with_opt_preview(), Pixel_in_screen_dhgr_mono_with_opt_preview(), Pixel_in_screen_direct_with_opt_preview(), Pixel_in_screen_egx_with_opt_preview(), Pixel_in_screen_gbc_with_opt_preview(), Pixel_in_screen_hgr_color_with_opt_preview(), Pixel_in_screen_hgr_mono_with_opt_preview(), Pixel_in_screen_layered_with_opt_preview(), Pixel_in_screen_overlay_with_opt_preview(), Pixel_in_screen_thomson_with_opt_preview(), Pixel_in_screen_underlay_with_opt_preview(), and Pixel_in_screen_zx_with_opt_preview().
Referenced by Layer_activate(), Set_loading_layer(), Switch_layer_mode(), and Update_screen_targets().
|
extern |
Paint a single pixel in image AND optionnaly on screen.
Referenced by Update_pixel_renderer().