|
|
Home » Community » U++ community news and announcements » Major Draw refactoring
Major Draw refactoring [message #22349] |
Tue, 07 July 2009 10:04 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
I am happy to announce that Draw development is getting to its final phase.
Current major step moved all GUI related issues to CtrlCore, leaving Draw "abstract", decoupling X11 (or GDI). Meanwhile, font/text support is still available (in POSIX using raw FontConfig).
Fonts are also much improved:
- new implementation allowed deprecating of FontInfo - you can now get all metrics directly from Font (FontInfo still exists to maintain compatibility).
- new system now supports font replacements - means you can now use CJK glyphs with any font and they will be taken from another font.
- Painter is now able to use both glyph composition and replacements.
Of course, as with any such major redesign, you can expect some issues and bugs...
The last phase should be relatively simple - moving Painter to Draw and fixing POSIX library requirements...
Mirek
[Updated on: Tue, 07 July 2009 13:54] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: Major Draw refactoring [message #22430 is a reply to message #22412] |
Tue, 14 July 2009 19:28 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
I just updated my version of UPP from the SVN and my code appears to be broken.
It wont compile due to the following errors:
Quote: |
D:\MyApps\OpenWind\WindMap.cpp(2745) : error C2664: 'Upp::ImageBuffer::ImageBuffer(Upp::Size)' : cannot convert parameter 1 from 'Upp::ImageDraw' to 'Upp::Size'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
D:\MyApps\OpenWind\main.cpp(1080) : error C2039: 'GetPagePixels' : is not a member of 'Upp::Draw'
C:\upp\uppsrc\Draw/Draw.h(412) : see declaration of 'Upp::Draw'
D:\MyApps\OpenWind\main.cpp(1105) : error C2039: 'GetPagePixels' : is not a member of 'Upp::PdfDraw'
C:\upp\uppsrc\PdfDraw/PdfDraw.h(228) : see declaration of 'Upp::PdfDraw'
D:\MyApps\OpenWind\main.cpp(1136) : error C2664: 'Upp::ImageBuffer::ImageBuffer(Upp::Size)' : cannot convert parameter 1 from 'Upp::ImageDraw' to 'Upp::Size'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
D:\MyApps\OpenWind\main.cpp(1163) : error C2664: 'Upp::ImageBuffer::ImageBuffer(Upp::Size)' : cannot convert parameter 1 from 'Upp::ImageDraw' to 'Upp::Size'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
D:\MyApps\OpenWind\main.cpp(1191) : error C2664: 'Upp::ImageBuffer::ImageBuffer(Upp::Size)' : cannot convert parameter 1 from 'Upp::ImageDraw' to 'Upp::Size'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
D:\MyApps\OpenWind\main.cpp(1219) : error C2664: 'Upp::ImageBuffer::ImageBuffer(Upp::Size)' : cannot convert parameter 1 from 'Upp::ImageDraw' to 'Upp::Size'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
D:\MyApps\OpenWind\WRGLayer.cpp(477) : error C2664: 'Upp::ImageBuffer::ImageBuffer(Upp::Size)' : cannot convert parameter 1 from 'Upp::ImageDraw' to 'Upp::Size'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
|
Is there any documentation on these changes please and are there equivalent replacement functions for those that have been removed? I thought that UPP was mature enough that this wasn't going to happen.
EDIT: ok well Vista was able to restore my previous version of UPP so I can continue working but of course I am now stuck in a limbo between 2008.1 and the latest version. Will these problems be fixed? I take it that there is another function instead of GetPagePixels (although I am not sure what other name could so perfectly sum up the function) but what about ImageDraw to ImageBuffer? How will that be accomplished in the new version?
Nick
[Updated on: Tue, 14 July 2009 19:53] Report message to a moderator
|
|
|
|
Re: Major Draw refactoring [message #22432 is a reply to message #22431] |
Wed, 15 July 2009 06:56 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Hi Mirek,
Here is the code fragment that gives the error at main.cpp(1163).
void OpenWind::PrintTIF()
{
FileSel fs;
fs.Type("TIF files", "*.tif").AllFilesType().DefaultExt("tif");
fs.ActiveDir(GetCurrentDirectory());
if(!fs.ExecuteSaveAs("Output TIF file"))
return;
CUtils::SetCurrentDirectory_(fs.GetActiveDir());
// drawgrid
if(m_optionGrid.GetData())
{
Size sz = m_rcClient.Size();
ImageDraw id(sz);
id.DrawImage(0,0,sz.cx,sz.cy,m_view);
DrawGrid(id);
ImageBuffer ib(id); // I beleive this is the problem right here
m_view = Image(ib);
}
TIFEncoder tif;
tif.SaveFile(~fs,m_view);
SaveWorldFile(~fs);
}
thanks for taking a look at this.
Nick
[Updated on: Wed, 15 July 2009 06:58] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Major Draw refactoring [message #22452 is a reply to message #22448] |
Thu, 16 July 2009 18:32 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
When I test my software with the latest UPP, my fonts are messed up (when I reload a workbbok from disk) as well as the drop-downs not working (not readable and not dropping down) and the GridCtrl appears to have its y-dimension squashed.
Also, the message boxes (e.g. PromptOK) don't display properly. They are squashed.
Is this intended behaviour and if so, what do I need to do to fix my software?
Nick
p.s. these appear to be Vista issues. It doesn't happen on Ubuntu64 (I can't test on XP 32 just now). I use Vista 64 as my main development platform just now and believe me, on that UPP is not looking good. It was fine before the refactoring though.
I have had to revert again as I need to be able to show a working version of my software. Could you please post in this thread when its fixed. Mirek, if you don't have Vista 64 and want to see the problem I can show you using showmypc.
[Updated on: Fri, 17 July 2009 00:20] Report message to a moderator
|
|
|
|
|
Goto Forum:
Current Time: Wed May 15 04:59:37 CEST 2024
Total time taken to generate the page: 0.01965 seconds
|
|
|