- This topic has 5 replies, 2 voices, and was last updated 11 years, 9 months ago by Kujo.
-
AuthorPosts
-
January 2, 2013 at 1:49 pm #35551KujoParticipant
Hi,
I need to extract some glyphs from the skin (for example a RadioButton or a CheckBox) and add they, with the transparent background, to the TsAlphaImageList.
I tried with DrawSkinGlyph procedure but the background of the glyphs is always white and not transparent.
Please, can someone explain me how to extract a Glyph, mix it with the mask (if present) or delete the background (if the mask is not present) and add it to the TsAlphaImageList?
Thank you in advanced.
Best Regards.
January 10, 2013 at 10:23 am #49814SupportKeymasterHello!
I can make a demo how to extract such image to 32bit bmp, but such bitmap can't be added into TsAlphaImageList because only Ico and Png are support there.
Maybe support of 32bit bmp will be added to this component also later.
January 10, 2013 at 1:46 pm #49826KujoParticipant'Support' wrote:Hello!
I can make a demo how to extract such image to 32bit bmp, but such bitmap can't be added into TsAlphaImageList because only Ico and Png are support there.
Maybe support of 32bit bmp will be added to this component also later.
Yes, if is possible to have a demo thanks a lot: I need to know how to extract a Glyph (PNG and bitmap formats) with the transparent background.
You wrote: …but such bitmap can't be added into TsAlphaImageList because only Ico and Png are support there
But with the following code I'm able to add a bitmap to the TsAlphaImageList; what am I doing wrong?
Code:var
GlypBmp : TBitmap;
GlyphSize : TSize;begin
GlyphSize.cx := WidthOfImage(DefaultManager.ma[AIndex]);
GlyphSize.cy := HeightOfImage(DefaultManager.ma[AIndex]);
AlphaImageList1.Width := GlyphSize.cx;
AlphaImageList1.Height := GlyphSize.cy;
GlyphBmp := CreateBmp32(GlyphSize.cx, GlyphSize.cy);
DrawSkinGlyph(GlyphBmp, Point(0, 0), 0, 1, DefaultManager.ma[AIndex], MakeCacheInfo(GlyphBmp));
AlphaImageList1.Add(GlyphBmp, nil);
FreeAndNil(GlyphBmp);
end;I'm sorry if I make stupid questions, but my job is focused on low level communications between hardware devices, so is not easy for me to understand and to manipulate the images.
January 28, 2013 at 4:14 pm #50060SupportKeymasterThis demo will be available with the next package release.
And AlphaImageList will support Bitmap 32bpp there, I think.
February 4, 2013 at 1:09 pm #50110SupportKeymasterHello
Promised demo is available now : http://www.alphaskins.com/sfiles/demos/glyphsfromskin.zip
Should be compiled with AC version 8.17
February 10, 2013 at 12:57 am #50142KujoParticipant'Support' wrote:Hello
Promised demo is available now : http://www.alphaskins.com/sfiles/demos/glyphsfromskin.zip
Should be compiled with AC version 8.17
Hello,
great support, this is exactly what I was looking for.
Thank you very much.
-
AuthorPosts
- You must be logged in to reply to this topic.