Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Cesar
  Where is Cesar?
 
 Brazil
 Cesar
 To: Bernard Bout
  Where is Bernard Bout?
 Brisbane
 Australia
 Bernard Bout
 Tags
Subject: RE: A Class I am working on
Thread ID: 154339 Message ID: 155047 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Saturday, December 22, 2007 3:13:25 PM         
   


> >
> >
> > Without testing, and incomplete:
> >
> >
> >
DO LOCFILE("System.prg")
> > 
> > local loBmp as xfcBitmap
> > loBmp = .Bitmap.FromFile(GETPICT())
> > 
> > local lnAlpha
> > lnAlpha = 0.5 && 50%
> > 
> > local loClrMatrix as xfcColorMatrix
> > loClrMatrix = .ColorMatrix.New(;
> >    1, 0, 0, 0, 0, ;
> >    0, 1, 0, 0, 0, ;
> >    0, 0, 1, 0, 0, ;
> >    0, 0, 0, lnAlpha, 0, ;
> >    0, 0, 0, 0, 1)
> > 
> > * Apply the ALPHA to it
> > loBmp.ApplyColorMatrix(loClrMatrix)
> > 
> > * Rotate the Image
> > loBmp.RotateFlip(.....
> > 
> > * Save it....

> >
> >
> > When you draw it under the original image, I recommend that you use the stretch property, in order to make the effect as you desire
> >
> > PS: The ApplyColorMAtrix methos is totally new, and you will need to have the latest version, that I asked you to download last week.
> >
> >
> >
> >
> >
> > Cesar Chalom
> > My Blog
>
> Based on your code I did this. Everything works except the image backgroung for the PNG is not transparent. Please see the sample in this file:
>
> https://www.foxite.com/uploads/ec391ae5-58c7-4880-a9ef-9be73910de30.zip
>
> Bernard
>
> ** If you see someone without a smile, give em one of yours :) **

Hi Bernard,

I updated the method, with a slight modification to allow transparencies. Please download again the latest version at CodePlex, from this link:
http://www.codeplex.com/VFPX/SourceControl/DownloadSourceCode.aspx?changeSetId=29314

Anyway, in the next days I'll post a sample that does the same in just one procedure using only API calls, allowing you to add to your VCX without the need of all GdiPlusX.

Hope this helps

Cesar Chalom
My Blog

ENTIRE THREAD

A Class I am working on Posted by Bernard Bout @ 12/14/2007 3:41:49 PM
RE: A Class I am working on Posted by Eric den Doop @ 12/14/2007 3:44:29 PM
RE: A Class I am working on Posted by Ken Murphy @ 12/14/2007 3:44:36 PM
RE: A Class I am working on Posted by Benny Thomas @ 12/14/2007 7:24:15 PM
RE: A Class I am working on Posted by Don Higgins @ 12/14/2007 7:27:07 PM
RE: A Class I am working on Posted by Emerson Reed @ 12/14/2007 8:02:39 PM
RE: A Class I am working on Posted by Cesar Chalom @ 12/14/2007 8:33:09 PM
RE: A Class I am working on Posted by Emerson Reed @ 12/15/2007 11:07:49 AM
RE: A Class I am working on Posted by M. Tanveer Ul Hassan Shaheen @ 12/18/2007 7:59:39 AM
RE: A Class I am working on Posted by Emerson Reed @ 12/18/2007 12:45:17 PM
RE: A Class I am working on Posted by M. Tanveer Ul Hassan Shaheen @ 12/18/2007 2:09:10 PM
RE: A Class I am working on Posted by Emerson Reed @ 12/19/2007 11:22:57 AM
RE: A Class I am working on Posted by Bernard Bout @ 12/15/2007 4:34:30 AM
RE: A Class I am working on Posted by Emerson Reed @ 12/15/2007 2:20:06 PM
RE: A Class I am working on Posted by Bernard Bout @ 12/15/2007 2:53:00 PM
RE: A Class I am working on Posted by Emerson Reed @ 12/17/2007 11:34:46 AM
RE: A Class I am working on Posted by Larry Crumbie @ 12/15/2007 3:59:10 PM
RE: A Class I am working on Posted by Bill Chambers @ 12/17/2007 5:32:12 PM
RE: A Class I am working on Posted by Mike Yearwood @ 12/17/2007 6:05:37 PM
RE: A Class I am working on Posted by Cesar Chalom @ 12/17/2007 6:24:12 PM
RE: A Class I am working on Posted by Bernard Bout @ 12/18/2007 1:48:37 AM
RE: A Class I am working on Posted by Cesar Chalom @ 12/18/2007 12:00:55 PM
RE: A Class I am working on Posted by Bernard Bout @ 12/18/2007 2:12:27 PM
RE: A Class I am working on Posted by Cesar Chalom @ 12/18/2007 3:25:23 PM
RE: A Class I am working on Posted by Bernard Bout @ 12/19/2007 12:14:22 AM
RE: A Class I am working on Posted by Bernard Bout @ 12/19/2007 1:03:42 AM
RE: A Class I am working on Posted by Cesar Chalom @ 12/22/2007 3:13:25 PM
RE: A Class I am working on Posted by Bernard Bout @ 12/23/2007 12:39:57 AM
RE: A Class I am working on Posted by Cesar Chalom @ 12/18/2007 11:12:30 PM
RE: A Class I am working on Posted by Bernard Bout @ 12/18/2007 1:47:02 AM
RE: A Class I am working on Posted by Ronan Masangcay @ 12/24/2007 11:11:38 AM
RE: A Class I am working on Posted by Boudewijn Lutgerink @ 12/25/2007 9:27:37 AM