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++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Package "Painter"
Package "Painter" [message #50309] Mon, 17 September 2018 12:47 Go to next message
pvictor is currently offline  pvictor
Messages: 67
Registered: December 2015
Member
Hi,

I compiled the latest IDE (12280) and then built a small app with it (Linux Mint 19, Xfce, 64 bits).
I noticed that the size of my app was increased by about 100 KB, as compared with previous compilation (1 month ago).
The package "CtrlCore" now uses package "Painter" (It didn't earlier). I removed that line from file "CtrlCore.upp" and rebuilt my app.
There were no errors and the size of app has decreased.
Is this package necessary on all platforms?

Best regards,
Victor
Re: Package "Painter" [message #50312 is a reply to message #50309] Mon, 17 September 2018 21:52 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Victor,

If I remember correctly, Painter is not strictly necessary. It actually does the very same job as Draw package, just much better. The main difference is that Painter is capable of subpixel precision, has better antialiasing and some SVG support. You can read more about it in the official announcement thread. I think there is even some way to disable it without removing the package from CtrlCore, but I don't remember exactly how... Someone else will have to give you a hint on that, if it is really possible.

TL;DR: If you care more about executable size than looks, you can just drop it Wink

Best regards,
Honza
Re: Package "Painter" [message #50320 is a reply to message #50309] Tue, 18 September 2018 16:34 Go to previous messageGo to next message
pvictor is currently offline  pvictor
Messages: 67
Registered: December 2015
Member
Hi Honza,

Are you sure that by just adding Painter to CtrlCore.upp and NOT using any specific functions from it, you can improve the look of app?
I compiled two versions of one application, with and without Painter, made screenshots and compared them in GIMP at high magnification.
They are identical pixel to pixel. I even changed the size of system default font and applications zoomed. Again no difference.
The only difference is the size of applications.
So, I'm afraid that simple adding Painter only adds 100 KB of unused code.

Best regards,
Victor
Re: Package "Painter" [message #50321 is a reply to message #50320] Tue, 18 September 2018 17:54 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

pvictor wrote on Tue, 18 September 2018 16:34
Are you sure that by just adding Painter to CtrlCore.upp and NOT using any specific functions from it, you can improve the look of app?

Well, it depends what your application actually does Smile If it is just basic GUI, then there is probably no difference. However if you used some custom drawing (for example when you use ScatterCtrl to draw graphs), the difference is quite visible.

It also lets you perform much more complex graphic operations (e.g. clipping, 2D transformations, etc.). But I guess you might be right, that for application, that has no need for that, you might call it a dead code. It just surprises me, that it was not removed by linker... It is perhaps because it really is used by the GUI drawing functions, it just makes no visible difference.

It is also possible that I'm dead wrong Very Happy I haven't coded any GUI application in years Rolling Eyes

Honza
Re: Package "Painter" [message #50322 is a reply to message #50321] Tue, 18 September 2018 17:56 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

PS: You can check the PainterExamples package to see what it can do. Maybe you'll find some use for it after all Smile
Re: Package "Painter" [message #50323 is a reply to message #50309] Tue, 18 September 2018 20:38 Go to previous message
pvictor is currently offline  pvictor
Messages: 67
Registered: December 2015
Member
Quote:

It just surprises me, that it was not removed by linker...

It contains .icpp file.
Quote:

This file type is recognized as .cpp source file, but unlike regular .cpp, which might be placed into the library first and eventually eliminated by linker, .icpp one is always linked as object file. This forces the file to be always linked. The rationale of this is that you can put module initialization code into .icpp that is linked into the executable even when code is not referenced from other files.


Victor
Previous Topic: I can't to build exe-file from default package.
Next Topic: Exe name depending on flags
Goto Forum:
  


Current Time: Thu Mar 28 21:52:35 CET 2024

Total time taken to generate the page: 0.00979 seconds