Home | Libraries | People | FAQ | More |
boost::ui::painter — 2D graphics rendering painter
// In header: <boost/ui/painter.hpp> class painter { public: // types typedef double gcoord_type; // Graphics coordinates signed number type. typedef void * native_handle_type; // Implementation-defined painter type. // member classes/structs/unions // Saves state in the constructor and restores it in the destructor. class state_saver : private noncopyable { public: // construct/copy/destruct state_saver(painter &); ~state_saver(); }; // construct/copy/destruct painter(unspecified); // private member functions void save_raw(); void restore_raw(); void scale_raw(gcoord_type, gcoord_type); void rotate_raw(gcoord_type); void translate_raw(gcoord_type, gcoord_type); void fill_color_raw(const color &); void stroke_color_raw(const color &); void clear_rect_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type); void fill_rect_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type); void stroke_rect_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type); void fill_text_raw(const uistring &, gcoord_type, gcoord_type); void draw_image_raw(const image &, gcoord_type, gcoord_type); void begin_path_raw(); void fill_raw(); void stroke_raw(); void line_width_raw(gcoord_type); void line_cap_raw(ui::line_cap); void line_join_raw(ui::line_join); void line_dash_raw(const std::vector< gcoord_type > &); void reset_line_dash_raw(); void font_raw(const ui::font &); void close_path_raw(); void move_to_raw(gcoord_type, gcoord_type); void line_to_raw(gcoord_type, gcoord_type); void quadratic_curve_to_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type); void bezier_curve_to_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type, gcoord_type, gcoord_type); void arc_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type, gcoord_type, bool); void rect_raw(gcoord_type, gcoord_type, gcoord_type, gcoord_type); // public member functions painter & save(); painter & restore(); painter & scale(gcoord_type, gcoord_type); painter & rotate(gcoord_type); painter & fill_color(const color &); painter & stroke_color(const color &); painter & begin_path(); painter & fill(); painter & stroke(); painter & line_width(gcoord_type); painter & line_cap(ui::line_cap); painter & line_join(ui::line_join); painter & font(const ui::font &); ui::font font() const; painter & close_path(); };
See Also:
2D computer graphics (Wikipedia)
See Also:
HTML Canvas 2D Context, Level 1 (W3C)
See Also:
HTML Canvas 2D Context, Level 2 (W3C)
painter
private member functionsvoid save_raw();
void restore_raw();
void scale_raw(gcoord_type x, gcoord_type y);
void rotate_raw(gcoord_type angle);
void translate_raw(gcoord_type x, gcoord_type y);
void fill_color_raw(const color & c);
void stroke_color_raw(const color & c);
void clear_rect_raw(gcoord_type x, gcoord_type y, gcoord_type width, gcoord_type height);
void fill_rect_raw(gcoord_type x, gcoord_type y, gcoord_type width, gcoord_type height);
void stroke_rect_raw(gcoord_type x, gcoord_type y, gcoord_type width, gcoord_type height);
void fill_text_raw(const uistring & text, gcoord_type x, gcoord_type y);
void draw_image_raw(const image & img, gcoord_type dx, gcoord_type dy);
void begin_path_raw();
void fill_raw();
void stroke_raw();
void line_width_raw(gcoord_type width);
void line_cap_raw(ui::line_cap lc);
void line_join_raw(ui::line_join lj);
void line_dash_raw(const std::vector< gcoord_type > & segments);
void reset_line_dash_raw();
void font_raw(const ui::font & f);
void close_path_raw();
void move_to_raw(gcoord_type x, gcoord_type y);
void line_to_raw(gcoord_type x, gcoord_type y);
void quadratic_curve_to_raw(gcoord_type cpx, gcoord_type cpy, gcoord_type x, gcoord_type y);
void bezier_curve_to_raw(gcoord_type cp1x, gcoord_type cp1y, gcoord_type cp2x, gcoord_type cp2y, gcoord_type x, gcoord_type y);
void arc_raw(gcoord_type x, gcoord_type y, gcoord_type radius, gcoord_type start_angle, gcoord_type end_angle, bool anticlockwise);
void rect_raw(gcoord_type x, gcoord_type y, gcoord_type w, gcoord_type h);
painter
public member functionspainter & save();Push state.
painter & restore();Pop state.
painter & scale(gcoord_type x, gcoord_type y);Adds scaling transformation.
painter & rotate(gcoord_type angle);Adds rotation transformation.
painter & fill_color(const color & c);Sets the current color used for filling shapes.
painter & stroke_color(const color & c);Sets the current color used for filling shapes.
painter & begin_path();Resets the current path.
painter & fill();Fills the current path.
painter & stroke();Strokes the current path.
painter & line_width(gcoord_type width);Sets line width (default is 1)
painter & line_cap(ui::line_cap lc);Sets type of line endings, default value is butt.
painter & line_join(ui::line_join lj);Sets type of line join, default value is miter.
painter & font(const ui::font & f);Sets font.
ui::font font() const;Returns font.
painter & close_path();Connects the last point to the first point in the subpath.