Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoShape.h
Show First 20 Lines • Show All 177 Lines • ▼ Show 20 Line(s) | 110 | public: | |||
---|---|---|---|---|---|
178 | /** | 178 | /** | ||
179 | * @brief Paint the shape fill | 179 | * @brief Paint the shape fill | ||
180 | * The class extending this one is responsible for painting itself. Since we do not | 180 | * The class extending this one is responsible for painting itself. Since we do not | ||
181 | * assume the shape is square the paint must also clear its background if it will draw | 181 | * assume the shape is square the paint must also clear its background if it will draw | ||
182 | * something transparent on top. | 182 | * something transparent on top. | ||
183 | * This can be done with a method like: | 183 | * This can be done with a method like: | ||
184 | * <code> | 184 | * <code> | ||
185 | painter.fillRect(converter.normalToView(QRectF(QPointF(0.0,0.0), size())), background());</code> | 185 | painter.fillRect(converter.normalToView(QRectF(QPointF(0.0,0.0), size())), background());</code> | ||
186 | * Or equavalent for non-square objects. | 186 | * Or equivalent for non-square objects. | ||
187 | * Do note that a shape's top-left is always at coordinate 0,0. Even if the shape itself is rotated | 187 | * Do note that a shape's top-left is always at coordinate 0,0. Even if the shape itself is rotated | ||
188 | * or translated. | 188 | * or translated. | ||
189 | * @param painter used for painting the shape | 189 | * @param painter used for painting the shape | ||
190 | * @param converter to convert between internal and view coordinates. | 190 | * @param converter to convert between internal and view coordinates. | ||
191 | * @see applyConversion() | 191 | * @see applyConversion() | ||
192 | * @param paintcontext the painting context. | 192 | * @param paintcontext the painting context. | ||
193 | */ | 193 | */ | ||
194 | virtual void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext) = 0; | 194 | virtual void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext) = 0; | ||
▲ Show 20 Lines • Show All 845 Lines • ▼ Show 20 Line(s) | 762 | /** | |||
1040 | void notifyChanged(); | 1040 | void notifyChanged(); | ||
1041 | 1041 | | |||
1042 | /** | 1042 | /** | ||
1043 | * A shape can be in a state that it is doing processing data like loading or text layout. | 1043 | * A shape can be in a state that it is doing processing data like loading or text layout. | ||
1044 | * In this case it can be shown on screen probably partially but it should really not be printed | 1044 | * In this case it can be shown on screen probably partially but it should really not be printed | ||
1045 | * until it is fully done processing. | 1045 | * until it is fully done processing. | ||
1046 | * Warning! This method can be blocking for a long time | 1046 | * Warning! This method can be blocking for a long time | ||
1047 | * @param asynchronous If set to true the processing will can take place in a different thread and the | 1047 | * @param asynchronous If set to true the processing will can take place in a different thread and the | ||
1048 | * function will not block until the shape is finised. | 1048 | * function will not block until the shape is finished. | ||
1049 | * In case of printing Flake will call this method from a non-main thread and only | 1049 | * In case of printing Flake will call this method from a non-main thread and only | ||
1050 | * start printing it when the in case of printing method returned. | 1050 | * start printing it when the in case of printing method returned. | ||
1051 | * If set to false the processing needs to be done synchronously and will | 1051 | * If set to false the processing needs to be done synchronously and will | ||
1052 | * block until the result is finished. | 1052 | * block until the result is finished. | ||
1053 | */ | 1053 | */ | ||
1054 | virtual void waitUntilReady(const KoViewConverter &converter, bool asynchronous = true) const; | 1054 | virtual void waitUntilReady(const KoViewConverter &converter, bool asynchronous = true) const; | ||
1055 | 1055 | | |||
1056 | /// checks recursively if the shape or one of its parents is not visible or locked | 1056 | /// checks recursively if the shape or one of its parents is not visible or locked | ||
▲ Show 20 Lines • Show All 249 Lines • Show Last 20 Lines |