Home » U++ Library support » U++ Core » ImageDraw not available in Draw
ImageDraw not available in Draw [message #53138] |
Sat, 07 March 2020 12:28 |
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
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 |
|
mirek
Messages: 13980 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
|
|
|
|
Goto Forum:
Current Time: Tue May 21 19:50:58 CEST 2024
Total time taken to generate the page: 0.02329 seconds
|