Skip to content

Gradient text and last version 11.6. #245

@fredvs

Description

@fredvs

Hello.

When using the previous version of BGRABitmap and compiling the test demo from here:
https://github.com/bgrabitmap/bgrabitmap/tree/master/test/test4ideu/fractal_tree

I get this:

fractral-tree1

You may note that the vertical text has nice rainbow gradient colors.

But using last BGRABitmap version 11.6, compiling the same code, I get that:

fractral-tree2

You may note here that the beautiful rainbow colors are now gray. ;-(

Here the concerned code:

 bmp.FontFullHeight := 40;
  bmp.FontStyle := [fsBold];
  textWidth := bmp.TextSize(SampleText).cx;
  grad := TBGRAHueGradient.Create(0,0,65535,40000,[hgoRepeat,hgoPositiveDirection,hgoLightnessCorrection]);
  scan := TBGRAGradientScanner.Create(grad, gtLinear, PointF(0, bmp.Height - MarginY), PointF(0, bmp.Height - MarginY - textWidth));
  bmp.TextOutAngle(bmp.Width - MarginX - bmp.FontFullHeight, bmp.Height - MarginY, 900, SampleText, scan);
  scan.Free;
  grad.Free;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions