Freeciv-3.1: /fast/freeciv/nightly/S3_1/client/include/canvas_g.h File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Enumerations | Functions | Variables
canvas_g.h File Reference
`#include "support.h"`
`#include "gui_proto_constructor.h"`

Go to the source code of this file.

## Enumerations

enum | line_type { LINE_NORMAL , LINE_BORDER , LINE_TILE_FRAME , LINE_GOTO , LINE_SELECT_RECT }

## Functions

| GUI_FUNC_PROTO (void, canvas_mapview_init, struct canvas *store)
| GUI_FUNC_PROTO (void, canvas_copy, struct canvas *dest, struct canvas *src, int src_x, int src_y, int dest_x, int dest_y, int width, int height) GUI_FUNC_PROTO(void
| GUI_FUNC_PROTO (void, canvas_put_sprite_full, struct canvas *pcanvas, int canvas_x, int canvas_y, struct sprite *sprite) GUI_FUNC_PROTO(void
struct canvas int int struct sprite bool int int fog_y | GUI_FUNC_PROTO (void, canvas_put_rectangle, struct canvas *pcanvas, struct color *pcolor, int canvas_x, int canvas_y, int width, int height) GUI_FUNC_PROTO(void
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y | GUI_FUNC_PROTO (void, canvas_put_line, struct canvas *pcanvas, struct color *pcolor, enum line_type ltype, int start_x, int start_y, int dx, int dy) GUI_FUNC_PROTO(void
| GUI_FUNC_PROTO (void, get_text_size, int *width, int *height, enum client_font font, const char *text) GUI_FUNC_PROTO(void

## Variables

| canvas_put_sprite
struct canvas * | pcanvas
struct canvas int | canvas_x
struct canvas int int | canvas_y
struct canvas int int struct sprite * | sprite
struct canvas int int struct sprite int | offset_x
struct canvas int int struct sprite int int | offset_y
struct canvas int int struct sprite int int int | width
struct canvas int int struct sprite int int int int | height
| canvas_put_sprite_fogged
struct canvas int int struct sprite * | psprite
struct canvas int int struct sprite bool | fog
struct canvas int int struct sprite bool int | fog_x
struct canvas int int struct sprite bool int int fog_y | canvas_fill_sprite_area
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color * | pcolor
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y | canvas_put_curved_line
struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y struct canvas struct color enum line_type ltype int start_x int start_y int dx int dy enum | client_font
| FONT_CITY_NAME
| FONT_CITY_PROD
| FONT_REQTREE_TEXT
| canvas_put_text

## Enumeration Type Documentation

## ◆ line_type

enum line_type

Enumerator
LINE_NORMAL |
LINE_BORDER |
LINE_TILE_FRAME |
LINE_GOTO |
LINE_SELECT_RECT |

Definition at line 25 of file canvas_g.h.

## Function Documentation

## ◆ GUI_FUNC_PROTO() [1/6]

GUI_FUNC_PROTO | ( | void | ,
|  | canvas_copy | ,
|  | struct canvas * | dest,
|  | struct canvas * | src,
|  | int | src_x,
|  | int | src_y,
|  | int | dest_x,
|  | int | dest_y,
|  | int | width,
|  | int | height
| ) |  |

## ◆ GUI_FUNC_PROTO() [2/6]

GUI_FUNC_PROTO | ( | void | ,
|  | canvas_mapview_init | ,
|  | struct canvas * | store
| ) |  |

## ◆ GUI_FUNC_PROTO() [3/6]

struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y GUI_FUNC_PROTO | ( | void | ,
|  | canvas_put_line | ,
|  | struct canvas * | pcanvas,
|  | struct color * | pcolor,
|  | enum line_type | ltype,
|  | int | start_x,
|  | int | start_y,
|  | int | dx,
|  | int | dy
| ) |  |

## ◆ GUI_FUNC_PROTO() [4/6]

struct canvas int int struct sprite bool int int fog_y GUI_FUNC_PROTO | ( | void | ,
|  | canvas_put_rectangle | ,
|  | struct canvas * | pcanvas,
|  | struct color * | pcolor,
|  | int | canvas_x,
|  | int | canvas_y,
|  | int | width,
|  | int | height
| ) |  |

## ◆ GUI_FUNC_PROTO() [5/6]

GUI_FUNC_PROTO | ( | void | ,
|  | canvas_put_sprite_full | ,
|  | struct canvas * | pcanvas,
|  | int | canvas_x,
|  | int | canvas_y,
|  | struct sprite * | sprite
| ) |  |

## ◆ GUI_FUNC_PROTO() [6/6]

GUI_FUNC_PROTO | ( | void | ,
|  | get_text_size | ,
|  | int * | width,
|  | int * | height,
|  | enum client_font | font,
|  | const char * | text
| ) |  |

## Variable Documentation

## ◆ canvas_fill_sprite_area

struct canvas int int struct sprite bool int int fog_y canvas_fill_sprite_area

Definition at line 55 of file canvas_g.h.

## ◆ canvas_put_curved_line

struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y canvas_put_curved_line

Definition at line 63 of file canvas_g.h.

Referenced by draw_reqtree().

## ◆ canvas_put_sprite

canvas_put_sprite

Definition at line 42 of file canvas_g.h.

Referenced by canvas_put_sprite_full(), pixmap_put_overlay_tile_draw(), put_overview_tile_area(), qtg_canvas_put_sprite_full(), and show_full_citybar().

## ◆ canvas_put_sprite_fogged

canvas_put_sprite_fogged

Definition at line 48 of file canvas_g.h.

Referenced by put_drawn_sprites().

## ◆ canvas_put_text

canvas_put_text

Definition at line 77 of file canvas_g.h.

Referenced by draw_reqtree(), show_full_citybar(), show_small_citybar(), and show_tile_label().

## ◆ canvas_x

struct canvas int canvas_x

Definition at line 43 of file canvas_g.h.

Referenced by action_button_pressed(), adjust_workers_button_pressed(), anchor_selection_rectangle(), base_canvas_to_map_pos(), battle_animation(), button_down_citymap(), canvas_fill_sprite_area(), canvas_pos_to_nearest_tile(), canvas_pos_to_tile(), canvas_put_rectangle(), canvas_put_sprite(), canvas_put_sprite(), canvas_put_sprite_fogged(), canvas_put_sprite_full(), canvas_put_sprite_full(), canvas_put_text(), canvas_to_city_pos(), city_dialog_redraw_map(), city_to_canvas_pos(), city_map::context_menu(), create_extra_pixbuf(), create_pixbuf_from_layers(), decrease_unit_hp_smooth(), dirty_rect(), draw_calculated_trade_routes(), draw_segment(), draw_selection_rectangle(), editor_end_selection_rectangle(), editor_mouse_button_press(), editor_mouse_button_release(), editor_mouse_move(), editor_resize_selection_rectangle(), editor_start_selection_rectangle(), explosion_animation(), flush_mapcanvas(), flush_mapcanvas(), generate_citydlg_dimensions(), key_city_overlay(), left_button_down_citymap(), link_mark_draw(), maybe_activate_keyboardless_goto(), city_map::mousePressEvent(), nuke_animation(), pixmap_put_overlay_tile(), pixmap_put_overlay_tile(), pixmap_put_overlay_tile_draw(), popit(), put_city(), put_cross_overlay_tile(), put_drawn_sprites(), put_nuke_mushroom_pixmaps(), put_one_element(), put_one_tile(), put_terrain(), put_unit(), put_unit_city_overlays(), put_unittype(), put_window_near_map_tile(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_rectangle(), qtg_canvas_put_sprite(), qtg_canvas_put_sprite_fogged(), qtg_canvas_put_sprite_full(), qtg_canvas_put_text(), recenter_button_pressed(), release_goto_button(), release_right_button(), right_button_down_citymap(), show_city_desc(), show_city_descriptions(), show_full_citybar(), show_small_citybar(), show_tile_label(), show_tile_labels(), tile_to_canvas_pos(), tile_visible_and_not_on_border_mapcanvas(), update_line(), update_map_canvas(), update_selection_rectangle(), and wakeup_button_pressed().

## ◆ canvas_y

struct canvas int int canvas_y

Definition at line 43 of file canvas_g.h.

Referenced by action_button_pressed(), adjust_workers_button_pressed(), anchor_selection_rectangle(), base_canvas_to_map_pos(), battle_animation(), button_down_citymap(), canvas_fill_sprite_area(), canvas_pos_to_nearest_tile(), canvas_pos_to_tile(), canvas_put_rectangle(), canvas_put_sprite(), canvas_put_sprite(), canvas_put_sprite_fogged(), canvas_put_sprite_full(), canvas_put_sprite_full(), canvas_put_text(), canvas_to_city_pos(), city_dialog_redraw_map(), city_to_canvas_pos(), city_map::context_menu(), create_extra_pixbuf(), create_pixbuf_from_layers(), decrease_unit_hp_smooth(), dirty_rect(), draw_calculated_trade_routes(), draw_segment(), draw_selection_rectangle(), editor_end_selection_rectangle(), editor_mouse_button_press(), editor_mouse_button_release(), editor_mouse_move(), editor_resize_selection_rectangle(), editor_start_selection_rectangle(), explosion_animation(), flush_mapcanvas(), flush_mapcanvas(), generate_citydlg_dimensions(), key_city_overlay(), left_button_down_citymap(), link_mark_draw(), maybe_activate_keyboardless_goto(), city_map::mousePressEvent(), nuke_animation(), pixmap_put_overlay_tile(), pixmap_put_overlay_tile(), pixmap_put_overlay_tile_draw(), popit(), put_city(), put_cross_overlay_tile(), put_drawn_sprites(), put_nuke_mushroom_pixmaps(), put_one_element(), put_one_tile(), put_terrain(), put_unit(), put_unit_city_overlays(), put_unittype(), put_window_near_map_tile(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_rectangle(), qtg_canvas_put_sprite(), qtg_canvas_put_sprite_fogged(), qtg_canvas_put_sprite_full(), qtg_canvas_put_text(), recenter_button_pressed(), release_goto_button(), release_right_button(), right_button_down_citymap(), help_widget::set_topic_extra(), show_city_desc(), show_city_descriptions(), show_full_citybar(), show_small_citybar(), show_tile_label(), show_tile_labels(), terrain_canvas(), tile_to_canvas_pos(), tile_visible_and_not_on_border_mapcanvas(), update_line(), update_map_canvas(), update_selection_rectangle(), and wakeup_button_pressed().

## ◆ client_font

struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite struct color int int canvas_y struct canvas struct color enum line_type ltype int start_x int start_y int dx int dy enum client_font

Definition at line 65 of file canvas_g.h.

Referenced by show_full_citybar(), and show_tile_label().

## ◆ fog

struct canvas int int struct sprite bool fog

Definition at line 51 of file canvas_g.h.

Referenced by canvas_put_sprite_fogged(), pixmap_put_overlay_tile_draw(), put_drawn_sprites(), and put_one_element().

## ◆ fog_x

struct canvas int int struct sprite bool int fog_x

Definition at line 51 of file canvas_g.h.

Referenced by canvas_put_sprite_fogged().

## ◆ FONT_CITY_NAME

FONT_CITY_NAME

Definition at line 70 of file canvas_g.h.

Referenced by get_font(), gui_update_font(), show_full_citybar(), show_small_citybar(), show_tile_label(), and update_font_from_theme().

## ◆ FONT_CITY_PROD

FONT_CITY_PROD

Definition at line 71 of file canvas_g.h.

Referenced by get_font(), gui_update_font(), load_gfxnumber(), show_full_citybar(), show_small_citybar(), and update_font_from_theme().

## ◆ FONT_REQTREE_TEXT

FONT_REQTREE_TEXT

Definition at line 72 of file canvas_g.h.

Referenced by research_diagram::create_tooltip_help(), draw_reqtree(), get_font(), and node_rectangle_minimum_size().

## ◆ height

struct canvas int int struct sprite int int int int height

Definition at line 44 of file canvas_g.h.

Referenced by add_gui_layer(), base_set_mapview_origin(), info_tile::calc_size(), calculate_max_upkeep_height(), canvas_copy(), canvas_create(), canvas_fill_sprite_area(), canvas_put_rectangle(), canvas_put_sprite(), canvas_put_sprite(), canvas_put_sprite_full(), canvas_to_city_pos(), hud_text::center_me(), city_to_canvas_pos(), correct_size_bcgnd_surf(), create_bcgnd_surf(), create_frame(), create_main_page(), create_player_icon(), progress_bar::create_region(), create_sprite(), create_surf(), create_surf_with_format(), create_surfaces(), create_tmap(), create_vertical(), create_vertical_surface(), crop_sprite(), draw_reqtree(), draw_trade_route_line(), production_widget::eventFilter(), flush_dirty(), get_overview_area_dimensions(), get_reqtree_dimensions(), get_spaceship_dimensions(), get_sprite_dimensions(), get_text_size(), goto_dialog::goto_dialog(), gui_dialog_set_default_size(), gui_get_sprite_dimensions(), gui_get_text_size(), image_copy(), initialize_city_dialogs(), intro_expose(), link_mark_draw(), load_gfxfile(), load_gfxnumber(), luaconsole_dialog_area_resize(), main_message_area_resize(), map_canvas_resize(), map_canvas_resized(), info_tab::maximize_chat(), units_select::mouseMoveEvent(), info_tab::mouseMoveEvent(), resize_widget::mousePressEvent(), info_tab::mouseReleaseEvent(), node_rectangle_minimum_size(), chatwdg::paint(), units_select::paint(), goto_dialog::paint(), minimap_view::paint(), messagewdg::paint(), xvote::paint(), progress_bar::paintEvent(), hud_message_box::paintEvent(), hud_text::paintEvent(), hud_input_box::paintEvent(), hud_action::paintEvent(), hud_unit_combat::paintEvent(), fc_double_edge::paintEvent(), unittype_item::paintEvent(), pixmap_copy(), popup_diplomatic_objects(), production_widget::production_widget(), put_nuke_mushroom_pixmaps(), resize_widget::put_to_corner(), put_unit_image(), put_unit_image_city_overlays(), put_unit_picture(), put_unit_picture_city_overlays(), qtg_canvas_copy(), qtg_canvas_create(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_rectangle(), qtg_canvas_put_sprite(), qtg_canvas_put_sprite_full(), qtg_create_sprite(), qtg_crop_sprite(), qtg_get_sprite_dimensions(), qtg_get_text_size(), redraw_unit_info_label(), minimap_thread::render(), fc_sidebar::resize_me(), fc_sidewidget::resize_pixmap(), minimap_view::resizeEvent(), info_tab::restore_chat(), map_view::resume_searching(), ruledit_main::ruledit_main(), science_diagram_center(), science_diagram_data(), science_diagram_update(), set_relative_window_position(), hud_message_box::set_text_title(), hud_input_box::set_text_title_definput(), help_widget::set_topic_extra(), set_video_mode(), setup_vertical_scrollbar_area(), show_city_desc(), show_city_descriptions(), show_full_citybar(), goto_dialog::show_me(), unit_hud_selector::show_me(), show_small_citybar(), show_tile_label(), show_tile_labels(), sprite_get_bounding_box(), sprite_get_pixbuf(), sprite_scale(), surface_get_pixbuf(), terrain_canvas(), trade_route_to_canvas_lines(), units_select::units_select(), unit_actions::update_actions(), hud_units::update_actions(), city_dialog::update_citizens(), fc_sidewidget::update_final_pixmap(), minimap_view::update_image(), and update_map_canvas().

## ◆ offset_x

struct canvas int int struct sprite int offset_x

Definition at line 44 of file canvas_g.h.

Referenced by canvas_put_sprite(), canvas_put_sprite(), fill_unit_sprite_array(), put_drawn_sprites(), and qtg_canvas_put_sprite().

## ◆ offset_y

struct canvas int int struct sprite int int offset_y

Definition at line 44 of file canvas_g.h.

Referenced by canvas_put_sprite(), canvas_put_sprite(), fill_unit_sprite_array(), put_drawn_sprites(), qtg_canvas_put_sprite(), and show_city_descriptions().

## ◆ pcanvas

struct canvas * pcanvas

Definition at line 42 of file canvas_g.h.

Referenced by canvas_fill_sprite_area(), canvas_put_curved_line(), canvas_put_line(), canvas_put_rectangle(), canvas_put_sprite(), canvas_put_sprite(), canvas_put_sprite_fogged(), canvas_put_sprite_full(), canvas_put_sprite_full(), canvas_put_text(), city_dialog_redraw_map(), draw_reqtree(), pixmap_put_overlay_tile_draw(), put_city(), put_drawn_sprites(), put_one_element(), put_one_tile(), put_overview_tile_area(), put_spaceship(), put_terrain(), put_unit(), put_unit_city_overlays(), put_unittype(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_curved_line(), qtg_canvas_put_line(), qtg_canvas_put_rectangle(), qtg_canvas_put_sprite(), qtg_canvas_put_sprite_fogged(), qtg_canvas_put_sprite_full(), qtg_canvas_put_text(), show_city_desc(), show_full_citybar(), show_small_citybar(), and show_tile_label().

## ◆ pcolor

struct canvas int int enum client_font font struct color * pcolor

Definition at line 57 of file canvas_g.h.

Referenced by __FillRectAlpha8888_32bit(), apply_tags(), apply_text_tag(), canvas_fill_sprite_area(), canvas_put_curved_line(), canvas_put_line(), canvas_put_rectangle(), canvas_put_text(), client_option_color_set(), color_alloc(), color_alloc_rgba(), color_brightness_score(), color_free(), create_filled_surface(), create_frame(), create_line(), create_plr_sprite(), create_sprite(), draw_calculated_trade_routes(), draw_selection_rectangle(), draw_trade_route_line(), fill_rect_alpha(), get_city_mapview_trade_routes(), img_createmap(), img_playerstr(), img_plot(), img_plot_tile(), img_save_ppm(), img_set_pixel(), link_mark_draw(), mapimg_colortest(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_curved_line(), qtg_canvas_put_line(), qtg_canvas_put_rectangle(), qtg_canvas_put_text(), qtg_color_alloc(), qtg_color_free(), qtg_create_sprite(), resize_window(), server_gui_color_free(), and surface_put_text().

## ◆ psprite

struct canvas int int struct sprite bool int int fog_y struct canvas struct sprite * psprite

Definition at line 50 of file canvas_g.h.

Referenced by canvas_fill_sprite_area(), canvas_put_sprite(), canvas_put_sprite_fogged(), canvas_put_sprite_full(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_sprite_fogged(), theme_free_sprites(), tileset_free_tiles(), pregame_options::update_buttons(), and fc_client::update_start_page().

## ◆ sprite

struct canvas int int struct sprite* sprite

Definition at line 43 of file canvas_g.h.

## ◆ width

struct canvas int int struct sprite int int int width

Definition at line 44 of file canvas_g.h.

Referenced by add_gui_layer(), base_set_mapview_origin(), info_tile::calc_size(), calculate_max_upkeep_height(), canvas_copy(), canvas_create(), canvas_fill_sprite_area(), canvas_put_rectangle(), canvas_put_sprite(), canvas_put_sprite(), canvas_put_sprite_full(), canvas_to_city_pos(), hud_text::center_me(), city_dialog_update_citizens(), city_to_canvas_pos(), convert_utf8_str_to_const_surface_width(), correct_size_bcgnd_surf(), create_bcgnd_surf(), create_frame(), create_horizontal(), create_horizontal_scrollbar(), create_horizontal_surface(), create_main_page(), create_player_icon(), progress_bar::create_region(), create_sprite(), create_surf(), create_surf_with_format(), create_surfaces(), create_tech_info(), create_tech_tree(), crop_sprite(), draw_reqtree(), draw_trade_route_line(), production_widget::eventFilter(), flush_dirty(), get_overview_area_dimensions(), get_progress_icon(), get_reqtree_dimensions(), get_spaceship_dimensions(), get_sprite_dimensions(), get_text_size(), goto_dialog::goto_dialog(), gui_dialog_set_default_size(), gui_get_sprite_dimensions(), gui_get_text_size(), image_copy(), intro_expose(), link_mark_draw(), load_gfxfile(), load_gfxnumber(), luaconsole_dialog_area_resize(), main_message_area_resize(), map_canvas_resize(), map_canvas_resized(), units_select::mouseMoveEvent(), info_tab::mouseMoveEvent(), fc_double_edge::mouseMoveEvent(), qfc_dialog::mousePressEvent(), resize_widget::mousePressEvent(), info_tab::mousePressEvent(), fc_double_edge::mousePressEvent(), info_tab::mouseReleaseEvent(), node_rectangle_minimum_size(), chatwdg::paint(), units_select::paint(), goto_dialog::paint(), minimap_view::paint(), messagewdg::paint(), xvote::paint(), progress_bar::paintEvent(), qfc_dialog::paintEvent(), hud_message_box::paintEvent(), hud_text::paintEvent(), hud_input_box::paintEvent(), hud_action::paintEvent(), hud_unit_combat::paintEvent(), hud_battle_log::paintEvent(), fc_double_edge::paintEvent(), unittype_item::paintEvent(), pixmap_copy(), populate_unit_image_table(), populate_unit_pic_table(), popup_diplomatic_objects(), production_widget::production_widget(), put_nuke_mushroom_pixmaps(), resize_widget::put_to_corner(), close_widget::put_to_corner(), put_unit_image(), put_unit_image_city_overlays(), put_unit_picture(), put_unit_picture_city_overlays(), qtg_canvas_copy(), qtg_canvas_create(), qtg_canvas_fill_sprite_area(), qtg_canvas_put_rectangle(), qtg_canvas_put_sprite(), qtg_canvas_put_sprite_full(), qtg_create_sprite(), qtg_crop_sprite(), qtg_get_sprite_dimensions(), qtg_get_text_size(), redraw_unit_info_label(), minimap_thread::render(), fc_sidebar::resize_me(), fc_sidewidget::resize_pixmap(), fc_game_tab_widget::resizeEvent(), minimap_view::resizeEvent(), map_view::resume_searching(), ruledit_main::ruledit_main(), science_diagram_center(), science_diagram_data(), science_diagram_update(), set_relative_window_position(), hud_message_box::set_text_title(), hud_input_box::set_text_title_definput(), help_widget::set_topic_extra(), set_video_mode(), show_city_desc(), show_city_descriptions(), show_full_citybar(), goto_dialog::show_me(), unit_hud_selector::show_me(), show_small_citybar(), show_tile_label(), show_tile_labels(), sprite_get_bounding_box(), sprite_get_pixbuf(), sprite_scale(), surface_get_pixbuf(), terrain_canvas(), trade_route_to_canvas_lines(), units_select::units_select(), city_dialog::update_citizens(), fc_sidewidget::update_final_pixmap(), minimap_view::update_image(), update_map_canvas(), and city_widget::update_model().