View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002356 | JEDI VCL | 00 JVCL Components | public | 2004-12-02 07:32 | 2004-12-11 06:21 |
Reporter | interware | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.10 | ||||
Target Version | Fixed in Version | 3.00 RC 1 | |||
Summary | 0002356: TJvExpressButton don't draw correctly alpha blended Images | ||||
Description | The code in JvLookOut of class TJvExpressButton is wrong: procedure TJvCustomLookOutButton.DrawSmallImages; begin if FDown then OffsetRect(FImageRect, FOffset, FOffset); FSmallImages.Draw(Canvas, FImageRect.Left, FImageRect.Top, FImageIndex); { ImageList_DrawEx(FSmallImages.Handle,FImageIndex,Canvas.Handle, FImageRect.Left,FImageRect.Top,0,0,clNone,clNone,ILD_TRANSPARENT);} end; This code work's fine until Win2000 if you load a norma icon in imagelist linked component. But in WinXP if you load alpha blended images the trasparency is not correct. Same thing for DrawLargeImage; | ||||
Additional Information | To solve this issue i proceed with this code (copied from TIcon Class Draw method) procedure TJvCustomLookOutButton.DrawSmallImages; var Icon: TIcon; begin if FDown then OffsetRect(FImageRect, FOffset, FOffset); Icon:=TIcon.Create; FLargeImages.GetIcon(FImageIndex, Icon); DrawIconEx(Canvas.Handle, FImageRect.Left, FImageRect.Top, Icon.Handle, 0, 0, 0, 0, DI_NORMAL); Icon.Free; end; | ||||
Tags | No tags attached. | ||||
|
Apart from you using a very old version of JVCL, do you have any proposal on how to draw alpha-blended icons? IIRC, there is no real support in the OS, so developers have to come up with their own routines. |
|
Forgot to mention: IIRC, TIcon and DrawIconEx can only be used with standard sized icons. Have you tested your code using images that are not "icon sized" (i.e different width/height, odd width/height)? |
|
Seems to work with uncommon image formats, so comitted to CVS. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-12-02 07:32 | interware | New Issue | |
2004-12-02 12:14 |
|
Note Added: 0005808 | |
2004-12-02 12:14 |
|
Status | new => feedback |
2004-12-07 07:05 |
|
Note Added: 0005839 | |
2004-12-11 06:21 |
|
Status | feedback => resolved |
2004-12-11 06:21 |
|
Resolution | open => fixed |
2004-12-11 06:21 |
|
Assigned To | => user72 |
2004-12-11 06:21 |
|
Note Added: 0005865 | |
2004-12-11 06:21 |
|
Assigned To | user72 => |