#include <scribble_manager.h>
Public Member Functions | |
ScribbleGC () | |
~ScribbleGC () | |
void | set_line_color (const unsigned long c) |
Change the X11 gc to use new line color. | |
void | set_line_attributes (const int width) |
Change the X11 gc to use new line attributes. Currently, only change the width. Always use LineSolid. | |
void | draw_line (const int x1, const int y1, const int x2, const int y2) |
Draw line on widget by using current line color, line width and line style. | |
Data Fields | |
float | realZoom |
The real zoom factor (0, maxZoom). | |
int | rotation |
Currently it must be one of {0, 270}. It could be {90, 180, 270}. | |
GtkWidget * | widget |
The widget scribble will be drawn on. | |
GdkGC * | gc |
X11 graphics context. |
Scribble graphics context. The scribble graphics context will be used by scribble manager to
Definition at line 75 of file scribble_manager.h.
test::ScribbleGC::ScribbleGC | ( | ) | [inline] |
test::ScribbleGC::~ScribbleGC | ( | ) | [inline] |
Definition at line 90 of file scribble_manager.h.
void test::ScribbleGC::draw_line | ( | const int | x1, | |
const int | y1, | |||
const int | x2, | |||
const int | y2 | |||
) | [inline] |
void test::ScribbleGC::set_line_attributes | ( | const int | width | ) | [inline] |
Change the X11 gc to use new line attributes. Currently, only change the width. Always use LineSolid.
Definition at line 103 of file scribble_manager.h.
References gc.
00104 { 00105 gdk_gc_set_line_attributes(gc 00106 , width 00107 , GDK_LINE_SOLID 00108 , GDK_CAP_PROJECTING 00109 , GDK_JOIN_MITER); 00110 }
void test::ScribbleGC::set_line_color | ( | const unsigned long | c | ) | [inline] |
Change the X11 gc to use new line color.
Definition at line 94 of file scribble_manager.h.
References gc.
00095 { 00096 GdkColor color; 00097 color.pixel = c; 00098 gdk_gc_set_foreground(gc, &color); 00099 }
GdkGC* test::ScribbleGC::gc |
X11 graphics context.
Definition at line 81 of file scribble_manager.h.
Referenced by draw_line(), set_line_attributes(), and set_line_color().
The real zoom factor (0, maxZoom).
Definition at line 78 of file scribble_manager.h.
Referenced by test::ScribbleMgr::on_erase_begin(), and test::ScribbleMgr::on_erase_move().
Currently it must be one of {0, 270}. It could be {90, 180, 270}.
Definition at line 79 of file scribble_manager.h.
Referenced by test::ScribbleMgr::draw_scribble_page(), test::ScribbleMgr::on_erase_begin(), test::ScribbleMgr::on_erase_end(), and test::ScribbleMgr::on_erase_move().
GtkWidget* test::ScribbleGC::widget |
The widget scribble will be drawn on.
Definition at line 80 of file scribble_manager.h.
Referenced by draw_line().