aboutsummaryrefslogtreecommitdiff
path: root/dw/fltkviewbase.cc
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2010-03-11 17:39:28 +0000
committercorvid <corvid@lavabit.com>2010-03-11 17:39:28 +0000
commit910cb898f28aba06b3257332dbaebac6fb40984e (patch)
treed35f858b4e5b7db3ba65968daad08a2d3587fad5 /dw/fltkviewbase.cc
parent286bfdb1e392ed133642f2e60e6c993102bcbea9 (diff)
drawArc() take coordinates of center
Diffstat (limited to 'dw/fltkviewbase.cc')
-rw-r--r--dw/fltkviewbase.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc
index 437c109a..7d519f05 100644
--- a/dw/fltkviewbase.cc
+++ b/dw/fltkviewbase.cc
@@ -401,13 +401,13 @@ void FltkViewBase::drawRectangle (core::style::Color *color,
void FltkViewBase::drawArc (core::style::Color *color,
core::style::Color::Shading shading, bool filled,
- int x, int y, int width, int height,
+ int centerX, int centerY, int width, int height,
int angle1, int angle2)
{
setcolor(((FltkColor*)color)->colors[shading]);
- int x1 = translateCanvasXToViewX (x);
- int y1 = translateCanvasYToViewY (y);
- ::fltk::Rectangle rect (x1, y1, width, height);
+ int x = translateCanvasXToViewX (centerX) - width / 2;
+ int y = translateCanvasYToViewY (centerY) - height / 2;
+ ::fltk::Rectangle rect (x, y, width, height);
addchord(rect, angle1, angle2);
closepath();
if (filled)