Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior 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

 
Read Message
Read Message
Read Message
Previous Topic: Method declared in iml_header.h but missing in iml_source.h
Next Topic: Painter Text Underline/Strikeout not working
Goto Forum:
  


Current Time: Mon May 06 06:23:53 CEST 2024

Total time taken to generate the page: 0.01664 seconds