Mercurial > hg > svgui
diff layer/Layer.h @ 389:2ed4e572d0d4
* Attempt fix for #1914752 export image has holes (1.0 and 1.2)
author | Chris Cannam |
---|---|
date | Tue, 20 May 2008 10:40:20 +0000 |
parents | e1a9e478b7f2 |
children | 73a58a4dfebd |
line wrap: on
line diff
--- a/layer/Layer.h Tue May 20 08:37:46 2008 +0000 +++ b/layer/Layer.h Tue May 20 10:40:20 2008 +0000 @@ -76,8 +76,29 @@ */ virtual bool supportsOtherZoomLevels() const { return true; } + /** + * Paint the given rectangle of this layer onto the given view + * using the given painter, superimposing it on top of any + * existing material in that view. The view is provided here + * because it is possible for one layer to exist in more than one + * view, so the dimensions of the view may vary from one paint + * call to another (without any view having been resized). + */ virtual void paint(View *, QPainter &, QRect) const = 0; + /** + * Enable or disable synchronous painting. If synchronous + * painting is enabled, a call to paint() must complete painting + * the entire rectangle before it returns. If synchronous + * painting is disabled (which should be the default), the paint() + * call may defer painting some regions if data is not yet + * available, by calling back on its view to schedule another + * update. Synchronous painting is necessary when rendering to an + * image. Simple layer types will always paint synchronously, and + * so may ignore this. + */ + virtual void setSynchronousPainting(bool /* synchronous */) { } + enum VerticalPosition { PositionTop, PositionMiddle, PositionBottom };