summaryrefslogtreecommitdiff
path: root/src/output.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/output.cpp')
-rw-r--r--src/output.cpp75
1 files changed, 9 insertions, 66 deletions
diff --git a/src/output.cpp b/src/output.cpp
index 8d526f6..ff6213a 100644
--- a/src/output.cpp
+++ b/src/output.cpp
@@ -6,12 +6,6 @@ CompOutput::CompOutput ()
{
mName = "";
mId = ~0;
- mRegion.rects = &mRegion.extents;
- mRegion.numRects = 1;
- mRegion.extents.x1 = 0;
- mRegion.extents.x2 = 0;
- mRegion.extents.y1 = 0;
- mRegion.extents.y2 = 0;
mWorkArea.x = 0;
mWorkArea.y = 0;
@@ -31,48 +25,6 @@ CompOutput::id ()
return mId;
}
-unsigned int
-CompOutput::x1 ()
-{
- return mRegion.extents.x1;
-}
-
-unsigned int
-CompOutput::y1 ()
-{
- return mRegion.extents.y1;
-}
-
-unsigned int
-CompOutput::x2 ()
-{
- return mRegion.extents.x2;
-}
-
-unsigned int
-CompOutput::y2 ()
-{
- return mRegion.extents.y2;
-}
-
-unsigned int
-CompOutput::width ()
-{
- return mRegion.extents.x2 - mRegion.extents.x1;
-}
-
-unsigned int
-CompOutput::height ()
-{
- return mRegion.extents.y2 - mRegion.extents.y1;
-}
-
-Region
-CompOutput::region ()
-{
- return &mRegion;
-}
-
XRectangle
CompOutput::workArea ()
{
@@ -104,31 +56,22 @@ CompOutput::setWorkArea (XRectangle workarea)
}
void
-CompOutput::setGeometry (unsigned int x1, unsigned int x2,
- unsigned int y1, unsigned int y2)
+CompOutput::setGeometry (int x1, int x2, int y1, int y2)
{
if (x1 < 0)
- mRegion.extents.x1 = 0;
- else
- mRegion.extents.x1 = x1;
+ x1 = 0;
if (y1 < 0)
- mRegion.extents.y1 = 0;
- else
- mRegion.extents.y1 = y1;
+ y1 = 0;
- if ((int) x2 < mRegion.extents.x1)
- mRegion.extents.x2 = mRegion.extents.x1;
- else
- mRegion.extents.x2 = x2;
+ if (x2 < 0)
+ x2 = 0;
- if ((int) y2 < mRegion.extents.y1)
- mRegion.extents.y2 = mRegion.extents.y1;
- else
- mRegion.extents.y2 = y2;
+ if (y2 < 0)
+ y2 = 0;
- mWorkArea.x = mRegion.extents.x1;
- mWorkArea.y = mRegion.extents.y1;
+ mWorkArea.x = this->x1 ();
+ mWorkArea.y = this->y1 ();
mWorkArea.width = width ();
mWorkArea.height = height ();
}