Custom thumbnail shape text

Post Reply
mjbiggs
Posts: 22
Joined: 01 Oct 10 20:50

Custom thumbnail shape text

Post by mjbiggs »

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: 7871
Joined: 13 Sep 03 6:24

Re: Custom thumbnail shape text

Post by Hert »

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. If you have suggestions, requests or need support then please send a message
mjbiggs
Posts: 22
Joined: 01 Oct 10 20:50

Re: Custom thumbnail shape text

Post by mjbiggs »

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