summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moreau <oreaus@gmail.com>2010-02-22 10:40:52 -0700
committerScott Moreau <oreaus@gmail.com>2010-02-22 11:06:09 -0700
commite7f252407a646d73d5019fc11eea72e3d1348eb0 (patch)
treea2d10b576390d363089bf1065c41f45c04233288
parent3f6c5425d108bcd8684c2d13ae7f6f55a991bec9 (diff)
downloadcompiz-core-doc-e7f252407a646d73d5019fc11eea72e3d1348eb0.tar.gz
compiz-core-doc-e7f252407a646d73d5019fc11eea72e3d1348eb0.tar.bz2
Use the same width for all lines.
-rw-r--r--plugins/annotate/annotate.xml.in14
-rw-r--r--plugins/annotate/src/annotate.cpp18
2 files changed, 10 insertions, 22 deletions
diff --git a/plugins/annotate/annotate.xml.in b/plugins/annotate/annotate.xml.in
index 9f8948e..d31dff2 100644
--- a/plugins/annotate/annotate.xml.in
+++ b/plugins/annotate/annotate.xml.in
@@ -68,20 +68,12 @@
<green>0xffff</green>
</default>
</option>
- <option name="line_width" type="float">
- <_short>Line width</_short>
- <_long>Line width for annotations</_long>
- <default>3.0</default>
- <min>0.1</min>
- <max>100.0</max>
- <precision>0.1</precision>
- </option>
<option name="stroke_width" type="float">
<_short>Stroke width</_short>
<_long>Stroke width for annotations</_long>
- <default>1.0</default>
- <min>0.1</min>
- <max>20.0</max>
+ <default>3.0</default>
+ <min>1.0</min>
+ <max>100.0</max>
<precision>0.1</precision>
</option>
</options>
diff --git a/plugins/annotate/src/annotate.cpp b/plugins/annotate/src/annotate.cpp
index b418a12..ec294aa 100644
--- a/plugins/annotate/src/annotate.cpp
+++ b/plugins/annotate/src/annotate.cpp
@@ -281,9 +281,9 @@ AnnoScreen::draw (CompAction *action,
cr = cairoContext ();
if (cr)
{
- const char *tool;
- unsigned short *fillColor, *strokeColor;
- double lineWidth, strokeWidth;
+ const char *tool;
+ unsigned short *fillColor, *strokeColor;
+ double strokeWidth;
tool =
CompOption::getStringOptionNamed (options, "tool", "line").c_str ();
@@ -303,10 +303,6 @@ AnnoScreen::draw (CompAction *action,
strokeWidth = CompOption::getFloatOptionNamed (options, "stroke_width",
strokeWidth);
- lineWidth = optionGetLineWidth ();
- lineWidth = CompOption::getFloatOptionNamed (options, "line_width",
- lineWidth);
-
if (strcasecmp (tool, "rectangle") == 0)
{
double x, y, w, h;
@@ -340,7 +336,7 @@ AnnoScreen::draw (CompAction *action,
x2 = CompOption::getFloatOptionNamed (options, "x2", 100);
y2 = CompOption::getFloatOptionNamed (options, "y2", 100);
- drawLine (x1, y1, x2, y2, lineWidth, fillColor);
+ drawLine (x1, y1, x2, y2, strokeWidth, fillColor);
}
else if (strcasecmp (tool, "text") == 0)
{
@@ -401,7 +397,7 @@ AnnoScreen::terminate (CompAction *action,
case LineMode:
drawLine (initialPointerX, initialPointerY,
lineVector.x (), lineVector.y (),
- optionGetLineWidth (),
+ optionGetStrokeWidth (),
optionGetStrokeColor ());
break;
@@ -671,7 +667,7 @@ AnnoScreen::glPaintOutput (const GLScreenPaintAttrib &attrib,
{
case LineMode:
glColor4usv (optionGetStrokeColor ());
- glLineWidth (optionGetLineWidth ());
+ glLineWidth (optionGetStrokeWidth ());
glBegin (GL_LINES);
glVertex2i (initialPointerX, initialPointerY);
glVertex2i (lineVector.x (), lineVector.y ());
@@ -771,7 +767,7 @@ AnnoScreen::handleMotionEvent (int xRoot,
case FreeDrawMode:
drawLine (annoLastPointerX, annoLastPointerY,
xRoot, yRoot,
- optionGetLineWidth (),
+ optionGetStrokeWidth (),
optionGetStrokeColor ());
break;