I'm polishing slider button. Made new shape bitmaps with gimp. This time
gimp created different pixels on each side, some of them have transparency
(base color was black for circle shape, it is a result of smooth /
antyalias option). TImagelist size is 7x7 because this is size of top-left,
bottom-left, bottom-right and top-right corners. For rest edges it is
enough to have 1px width/height because I can use "stretch" option while
adding png files into timagelist. Unfortunately these 1 pixel bitmaps have
transparency. When adding them as stretched, they becomes some kind of
gradient. Don't know if this is just normal stretch policy (algorithm) or I
need to check something when exporting to PNG in gimp. Currently my options
are as on second screenshot. Translation from Polish is "save background
color" and "save color's values for transparent pixels", compression is set
to 0. In first screenshot, indexes 1 and 3 are added with stretch mode,
they sizes are 7x1 and 1x7, just simply one black pixel with transparency
arround 60%. I can solve this by making these 1x7px bitmaps as 7x7 by
simply copy and paste in gimp and add without stretch check. That is not a
problem because size of my slider buttons is fixed. But just wondering if
it's possible to add such bitmaps as "repeated", not "stretched". If not
then it could be cool feature, for example make small pattern in gimp which
is repeated and looks uniformly, like grip in splitters.

BTW: How to make transparent colorty at runtime? For example, I would like
to make shape in gimp with base color stricte black (it may have black
transparency pixels due to smoothing / antyaliasing). Add it to image list
as base shape and then manipulate at runtime, for example set color to
green (or still black) with alpha 50%:
timagelist.bitmap.init(rgbtocolor(0,127,0,50)). Can't find any rgbtocolor
related function with alpha param
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to