WPCubed Product Support

TextOutline

Hello,
I know I have been asking a lot of questions lately but I happen to have one more.

Is there a way to outline the text in another color?
For example, instead of having just back text there it would be the black text and around all the edges would be a different color that's maybe one or two pixels wide.

Would you have any suggestions on where to start if I were to work in the WPRichText code to make it a possibility? For my purposes I wouldn't need the data saved into the RTF just an option for display.

Thank you[/img]

#1 ♥ 0
5.8k Views 2 users read 3 min
support

Hi,

currently there is no text outlining possibility except for the hoover effect for hyperlinks.

Maybe the custom draw function OnInternPaintPar is a possibility to solve the problem.

Julian

#2 ♥ 0

I am wanting to use a Rich Text Label so I do not have access to the OnInternPaint, So instead I am extending the class and redoing the Paint procedure.

I am using the DrawRTF function and drawing five different times. Four of one color and each moved to the left, right, top, or bottom by 1 or 2.

But I am having an issue with the width and height. They work in the original paint procedure but in my paint procedure they does not. They do not draw to scale.

Any help would be appreciated as always. And I want to thank you for the last three answers in other posts you had given me. Seems better to thank you here than in three different places.

#3 ♥ 0
support

Hi,

If you send me an example project I can check it out for You.

Julian

#4 ♥ 0

Hi,
I am redefining the paint procedure in an extended WPRichTextLabel Component

here is the code within the paint procedure

procedure WPLabelEx.Paint;
var
  FWidth,FHeight : Integer;
begin
//  inherited;
  TextColor:=clred;

  FWidth := DeskWidth;//round(Width*(resizing/100));
  FHeight := DeskHeight;//round(Height*(resizing/100));

  PaintRTFPage(PageNumber, -1, -1, FWidth, FHeight, Canvas, [wppShowHotStyles, wppNoPageBackground],
        0, 0,  -1, -1, [wpUseProvidedWidthHeight]);
  PaintRTFPage(PageNumber, +1, +1, FWidth, FHeight, Canvas, [wppShowHotStyles, wppNoPageBackground],
        0, 0, -1, -1, [wpUseProvidedWidthHeight]);
  PaintRTFPage(PageNumber, +1, -1, FWidth, FHeight, Canvas, [wppShowHotStyles, wppNoPageBackground],
        0, 0, -1, -1, [wpUseProvidedWidthHeight]);
  PaintRTFPage(PageNumber, -1, +1, FWidth, FHeight, Canvas, [wppShowHotStyles, wppNoPageBackground],
        0, 0, -1, -1, [wpUseProvidedWidthHeight]);

  TextColor:=clLime;
  PaintRTFPage(PageNumber, -0, -0, FWidth, FHeight, Canvas, [wppShowHotStyles, wppNoPageBackground],
        0, 0, -1, -1, [wpUseProvidedWidthHeight]);      
end;

I am drawing 4 versions of it in red offset to make a larger images of the text then placing a different color font right in the center of the other 4. This works great and looks nice however it doesn't scale the same as the text drawn in the original paint procedure.

Thankyou

#5 ♥ 0
This category is archived. No new posts are possible.