Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Assertion fails in BufferPainter::TransformOp() with rotated text
Assertion fails in BufferPainter::TransformOp() with rotated text [message #47288] |
Tue, 03 January 2017 09:55  |
Tom1
Messages: 1303 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi,
When calling Painter::DrawText (for rotated text output):
...
painter.DrawText(x,y,rotation,text,font,Black());
...
The following assertion triggers in DEBUG mode:
void BufferPainter::TransformOp(const Xform2D& m)
{
ASSERT_(IsNull(current), "Cannot change transformation during path definition");
pathattr.mtx = attr.mtx = m * attr.mtx;
}
In RELEASE mode DrawText works just as it should, allowing rotation of text about its insertion point while retaining original transformation in the background (because of Begin()/End() pair involved). Similar temporary transformations are needed when rendering constant blocks of vector graphics at different locations with different scaling and rotation attributes. I guess Begin()/End() pairs should be used there too to preserve original transformation.
Is this assertion really needed for something?
Best regards,
Tom
|
|
|
Goto Forum:
Current Time: Wed Jun 18 14:56:42 CEST 2025
Total time taken to generate the page: 0.04697 seconds
|