chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e79ff9
)
The AngleArc() function that was being used to draw circles on Windows turns
author
Jacob Nevins
<jacobn@chiark.greenend.org.uk>
Sat, 25 Jun 2005 13:24:19 +0000
(13:24 +0000)
committer
Jacob Nevins
<jacobn@chiark.greenend.org.uk>
Sat, 25 Jun 2005 13:24:19 +0000
(13:24 +0000)
out to be unsupported on the Win9x/Me series. Use Arc() instead (tested on
Win98 and Win2K).
[originally from svn r6012]
windows.c
patch
|
blob
|
history
diff --git
a/windows.c
b/windows.c
index 67469b1c8a86f040092cdef98b8ab65d288507b3..ae93983f40bff9ab1c2b676070906e86d555481a 100644
(file)
--- a/
windows.c
+++ b/
windows.c
@@
-342,10
+342,11
@@
void draw_circle(frontend *fe, int cx, int cy, int radius,
SelectObject(fe->hdc_bm, oldpen);
} else {
HPEN oldpen = SelectObject(fe->hdc_bm, fe->pens[colour]);
- MoveToEx(fe->hdc_bm, cx + radius, cy, NULL);
- AngleArc(fe->hdc_bm, cx, cy, radius, 0.0F, 360.0F);
+ Arc(fe->hdc_bm, cx - radius, cy - radius,
+ cx + radius + 1, cy + radius + 1,
+ cx - radius, cy, cx - radius, cy);
SelectObject(fe->hdc_bm, oldpen);
- }
+ }
}
void draw_polygon(frontend *fe, int *coords, int npoints,