mirror of
https://github.com/fltk/fltk.git
synced 2026-06-02 07:26:57 +08:00
Fix X11: test/curve "points" mode not drawn correctly (#1110)
This commit is contained in:
@@ -125,7 +125,6 @@ public:
|
|||||||
void restore_clip() FL_OVERRIDE;
|
void restore_clip() FL_OVERRIDE;
|
||||||
int not_clipped(int x, int y, int w, int h) FL_OVERRIDE;
|
int not_clipped(int x, int y, int w, int h) FL_OVERRIDE;
|
||||||
|
|
||||||
void begin_points() FL_OVERRIDE;
|
|
||||||
void begin_line() FL_OVERRIDE;
|
void begin_line() FL_OVERRIDE;
|
||||||
void begin_loop() FL_OVERRIDE;
|
void begin_loop() FL_OVERRIDE;
|
||||||
void begin_polygon() FL_OVERRIDE;
|
void begin_polygon() FL_OVERRIDE;
|
||||||
|
|||||||
@@ -426,13 +426,6 @@ void Fl_Cairo_Graphics_Driver::reconcat(){
|
|||||||
cairo_transform(cairo_, &mat);
|
cairo_transform(cairo_, &mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Cairo_Graphics_Driver::begin_points() {
|
|
||||||
cairo_save(cairo_);
|
|
||||||
concat();
|
|
||||||
cairo_new_path(cairo_);
|
|
||||||
gap_=1;
|
|
||||||
what=POINTS;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Fl_Cairo_Graphics_Driver::begin_line() {
|
void Fl_Cairo_Graphics_Driver::begin_line() {
|
||||||
cairo_save(cairo_);
|
cairo_save(cairo_);
|
||||||
@@ -460,11 +453,7 @@ void Fl_Cairo_Graphics_Driver::begin_polygon() {
|
|||||||
|
|
||||||
void Fl_Cairo_Graphics_Driver::vertex(double x, double y) {
|
void Fl_Cairo_Graphics_Driver::vertex(double x, double y) {
|
||||||
if (what==POINTS){
|
if (what==POINTS){
|
||||||
cairo_move_to(cairo_, x, y);
|
return Fl_Graphics_Driver::vertex(x, y);
|
||||||
cairo_rectangle(cairo_, x-0.5, y-0.5, 1, 1);
|
|
||||||
cairo_fill(cairo_);
|
|
||||||
gap_=1;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (gap_){
|
if (gap_){
|
||||||
cairo_move_to(cairo_, x, y);
|
cairo_move_to(cairo_, x, y);
|
||||||
@@ -541,7 +530,9 @@ void Fl_Cairo_Graphics_Driver::pie(int x, int y, int w, int h, double a1, double
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Cairo_Graphics_Driver::end_points() {
|
void Fl_Cairo_Graphics_Driver::end_points() {
|
||||||
end_line();
|
for (int i = 0; i < n; i++) {
|
||||||
|
point(xpoint[i].x, xpoint[i].y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_Cairo_Graphics_Driver::end_line() {
|
void Fl_Cairo_Graphics_Driver::end_line() {
|
||||||
@@ -575,9 +566,7 @@ void Fl_Cairo_Graphics_Driver::end_polygon() {
|
|||||||
|
|
||||||
void Fl_Cairo_Graphics_Driver::transformed_vertex(double x, double y) {
|
void Fl_Cairo_Graphics_Driver::transformed_vertex(double x, double y) {
|
||||||
if (what == POINTS) {
|
if (what == POINTS) {
|
||||||
cairo_move_to(cairo_, x, y);
|
Fl_Graphics_Driver::transformed_vertex(x, y);
|
||||||
point(x, y);
|
|
||||||
gap_ = 1;
|
|
||||||
} else {
|
} else {
|
||||||
reconcat();
|
reconcat();
|
||||||
if (gap_) {
|
if (gap_) {
|
||||||
|
|||||||
Reference in New Issue
Block a user