View Issue Details

IDProjectCategoryView StatusLast Update
0002356JEDI VCL00 JVCL Componentspublic2004-12-11 06:21
ReporterinterwareAssigned To 
Status resolvedResolutionfixed 
Product Version2.10 
Target VersionFixed in Version3.00 RC 1 
Summary0002356: TJvExpressButton don't draw correctly alpha blended Images
DescriptionThe code in JvLookOut of class TJvExpressButton is wrong:

procedure TJvCustomLookOutButton.DrawSmallImages;
  if FDown then
    OffsetRect(FImageRect, FOffset, FOffset);

  FSmallImages.Draw(Canvas, FImageRect.Left, FImageRect.Top, FImageIndex);
  { ImageList_DrawEx(FSmallImages.Handle,FImageIndex,Canvas.Handle,

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 InformationTo solve this issue i proceed with this code (copied from TIcon Class Draw method)

procedure TJvCustomLookOutButton.DrawSmallImages;
  Icon: TIcon;
  if FDown then
    OffsetRect(FImageRect, FOffset, FOffset);
  FLargeImages.GetIcon(FImageIndex, Icon);
  DrawIconEx(Canvas.Handle, FImageRect.Left, FImageRect.Top, Icon.Handle, 0, 0,
    0, 0, DI_NORMAL);
TagsNo tags attached.



2004-12-02 12:14


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.


2004-12-07 07:05


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)?


2004-12-11 06:21


Seems to work with uncommon image formats, so comitted to CVS.

Issue History

Date Modified Username Field Change
2004-12-02 07:32 interware New Issue
2004-12-02 12:14 user72 Note Added: 0005808
2004-12-02 12:14 user72 Status new => feedback
2004-12-07 07:05 user72 Note Added: 0005839
2004-12-11 06:21 user72 Status feedback => resolved
2004-12-11 06:21 user72 Resolution open => fixed
2004-12-11 06:21 user72 Assigned To => user72
2004-12-11 06:21 user72 Note Added: 0005865
2004-12-11 06:21 user72 Assigned To user72 =>