Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002356 [JEDI VCL] 00 JVCL Components minor always 2004-12-02 07:32 2004-12-11 06:21
Reporter interware View Status public  
Assigned To
Priority normal Resolution fixed  
Status resolved   Product Version 2.10
Summary 0002356: TJvExpressButton don't draw correctly alpha blended Images
Description The 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 Information To 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);
Tags No tags attached.
Attached Files

- Relationships

-  Notes
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 =>

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker