Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Package "Painter"
Package "Painter" [message #50309] |
Mon, 17 September 2018 12:47 |
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 |
|
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
Best regards,
Honza
|
|
|
|
Re: Package "Painter" [message #50321 is a reply to message #50320] |
Tue, 18 September 2018 17:54 |
|
pvictor wrote on Tue, 18 September 2018 16:34Are 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 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 I haven't coded any GUI application in years
Honza
|
|
|
|
Re: Package "Painter" [message #50323 is a reply to message #50309] |
Tue, 18 September 2018 20:38 |
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
|
|
|
Goto Forum:
Current Time: Wed Jun 05 22:26:32 CEST 2024
Total time taken to generate the page: 0.01998 seconds
|