Custom thumbnail shape text

Post Reply
mjbiggs
Posts: 17
Joined: 01 Oct 10 21:50

Custom thumbnail shape text

Post by mjbiggs » 11 Nov 20 9:59

Hello

Is there a way to overlay text onto a shape (or use a text box) when writing scripts for custom thumbnails?

The following creates a rectangle followed by the text 'label' but I'd like to overlay the text onto the rectangle:

Code: Select all

%code
begin
AFontColor := '#FFFFFFFF';
AShapeColor := '#FF40FF40';
AShapeRectangle := 'M 1,1 L 5,1 L 5,2 L 1,2 L 1,1 Z';
AShapeText := 'label';
result := '';
result := result + '<font color="'+ AFontColor  +'">';
result := result + '<img size="80" path="' + AShapeRectangle + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + AShapeColor  + '">';
result := result + AShapeText ;
result := result + '</font>';
end;
%/code

Hert
Posts: 6437
Joined: 13 Sep 03 7:24

Re: Custom thumbnail shape text

Post by Hert » 11 Nov 20 11:33

Try using <ind>

Code: Select all

%code
begin
	AFontColor := '#FFFFFFFF';
	AShapeColor := '#FF40FF40';
	AShapeRectangle := 'M 1,1 L 5,1 L 5,2 L 1,2 L 1,1 Z';
	AShapeText := '%fileextension{encode=quotes}';
	result := '';
	result := result + '<font color="'+ AFontColor  +'">';
	result := result + '<img size="80" path="' + AShapeRectangle + '" pathfillstyle="none" pathstrokestyle="solid" pathstrokecolor="' + AShapeColor  + '">';
	result := result + '<ind x="-145">' + AShapeText + '</ind>';
	result := result + '</font>';
end;
%/code
Or this as an alternative:

Code: Select all

%code
begin
	AFontColor := '#FFFFFFFF';
	AShapeColor := '#FF009933';
	AShapeRectangle := 'M 1,1 L 5,1 L 5,2 L 1,2 L 1,1 Z';
	AShapeText := '%fileextension{encode=quotes}';
	result := '';
	result := result + '<font color="'+ AFontColor  +'" bgcolor="' + AShapeColor + '" bgradius="0.3">';
	result := result + '  ' + AShapeText + '  ';
	result := result + '</font>';
end;
%/code
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

mjbiggs
Posts: 17
Joined: 01 Oct 10 21:50

Re: Custom thumbnail shape text

Post by mjbiggs » 11 Nov 20 12:09

That's excellent. Just tried both methods. Just what I wanted.
Many thanks. Regards
Mike

Post Reply