This project is read-only.

GDIPlusX: LinearGradientBrush

Topics: Enhancement Request, General
Oct 1, 2010 at 12:59 PM

I would like to know if the LinearGradientBrush supports StartPoint, EndPoint and GradientStops - and if not if there are plans for thenm to be supported in the future.  Many Thanks

Oct 2, 2010 at 3:01 AM

Hi Paul,

Yes, it is possible. Please have a look at the GdiPlusX samples "Gradient3.scx" and "Gradients.scx".

HTH

Cesar

Oct 2, 2010 at 1:40 PM

Thanks for your reply Cesar but I can't seem find those samples anywhere ...

Paul

Oct 3, 2010 at 12:29 AM

Get the DEMO version from here:

http://vfpx.codeplex.com/releases/view/8606

Hope that helps !

Oct 3, 2010 at 10:49 AM

Many Thanks Cesar - can I just say that it would be helpful if the download page for the latest version had the link to the samples download on it ...

Paul Newton

Oct 3, 2010 at 3:32 PM

Hi Paul,

I truly don't know what happened with that release. Notice that the DEMO version that I pointed you is not the most recent.

The latest sources are version 1.20 , and the DEMO version brings version 1.10. Just take care to use the latest sources. We definitely have to create a new release for the DEMOS, thanks for bringing this to our attention.

Oct 5, 2010 at 1:37 PM

In the following scenario I want to get the RGB value for any intermediate point  (e.g. 0.25 or 0.75).  Is this possible ?

    cb = .Drawing2d.ColorBlend.New(3)
    cb.Positions[1] = 0
    cb.Positions[1] = 0.5
    cb.Positions[1] = 1.0
    cb.Colors = .Color.NewArray(.Color.Red,  .Color.Yellow, .Color.Blue)
    br.InterpolationColors = cb

Many thanks

Oct 5, 2010 at 2:49 PM

Correction:

    cb.Positions[1] = 0
    cb.Positions[2] = 0.5
    cb.Positions[3] = 1

Oct 7, 2010 at 1:24 AM

I truly don't know a simple way

If you really need it, you can use the GetPixel function from the xfcBitmap class to get the color.