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 » U++ Core » ImageDraw not available in Draw
ImageDraw not available in Draw [message #53138] Sat, 07 March 2020 12:28 Go to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi,

I currently use ImageDraw in my app and when compiling with Clang I get the following error :

error: variable has incomplete type 'Upp::ImageDraw'

After som investigation, ImageDraw is forward declared in Draw (and explained in Draw documentation) while all implementations of ImageDraw are implemented in CtrlCore
Since it is set in draw it should be available in head-less apps like the reference/ConsoleDraw example.
If I add
ImageDraw myImd;

to the example .. I get the same error

Obviously either ImageDraw should not be declared in Draw or a head-less implementation is missing in Draw

But i Draw/Image.h ther is the folling code:
// BW, defined in CtrlCore:
	ImageBuffer(ImageDraw& iw);

So this problem is apparently known ... and the questions resumes to :

Is ImageDraw supposed to be used in head-less apps, if not, with what must I replace it with ?

Re: ImageDraw not available in Draw [message #53139 is a reply to message #53138] Sat, 07 March 2020 17:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hi,

yes, ImageDraw is not in Draw.

The reason is following: ImageDraw must 100% match the screen rendering, to the point that if you draw something on the screen and with ImageDraw, then put ImageDraw on screen, results must 100% match. This is e.g. required for backdrawing.

That means ImageDraw needs to use same host-platform drawing routines as SystemDraw (e.g. GDI32 in Win32), which implies that it needs to be implemented in CtrlCore as Draw is supposed to be GUI/Host independent, pure virtual...

Anyway, solution to your problem is trivial. If you for some reason do not want to use Painter / ImagePainter, you have SImageDraw class in Draw package which is basically reimplementing all primitives in U++ code...

Mirek
Re: ImageDraw not available in Draw [message #53144 is a reply to message #53139] Sun, 08 March 2020 19:03 Go to previous message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hello Mirek,

Thank you for you're quick reply.
It's been some time now since I intensively used UPP so I have to review my knowledge about Draw
Previous Topic: Vector& Vector::operator<<(T&& x) is missing
Next Topic: DeepCopyOption do_clone inconsistancy?
Goto Forum:
  


Current Time: Thu Apr 18 14:05:00 CEST 2024

Total time taken to generate the page: 0.02177 seconds