[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/office/flake/lib
From: Thomas Zander <zander () kde ! org>
Date: 2006-05-18 11:50:50
Message-ID: 1147953050.725330.8257.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 542134 by zander:
Make hasTransparancy a virtual method
M +10 -2 KoShape.h
M +0 -2 TODO
--- trunk/playground/office/flake/lib/KoShape.h #542133:542134
@@ -68,7 +68,13 @@
/**
* @brief Paint the object
- *
+ * The class extending this one is responsible for painting itself. Since we do not
+ * assume the shape is square the paint must also clear its background if it will draw
+ * something transparant on top.
+ * This can be done with a method like:
+ * <code>
+ painter.fillRect(converter.normalToView(QRectF(QPointF(0.0,0.0), size())), background());</code>
+ * Or equavalent for non-square objects.
* @param painter used for painting the object
* @param converter to convert between internal and view coordinates.
* @see applyConversion()
@@ -208,9 +214,11 @@
/**
* Returns true if there is some transparancy, false if the shape is fully opaque.
+ * The default implementation will just return if the background has some transparancy,
+ * you should override it and always return true if your shape is not square.
* @return if the shape is (partly) transparant.
*/
- bool hasTransparancy() { return !m_backgroundBrush.isOpaque(); }
+ virtual bool hasTransparancy() { return !m_backgroundBrush.isOpaque(); }
/**
* Retrieve the z-coordinate of this graphics object.
--- trunk/playground/office/flake/lib/TODO #542133:542134
@@ -7,5 +7,3 @@
Also here a bool for the destructor -> del KoShape
* discuss possibility to move KoShapp::m_connectors to a specialized class
(since its only for Kivio)
-
-* add KeepAspectRatio bool in KoShape ?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic