Motion - New Draw Text Method

New Draw Text Method

Introduction

This patch is a new method for drawing characters on Motion frames.

Description of Patch

Previously, the function draw_textn had two steps:
1. Trace a four-pointed 'star' around the outline of the character in black.
2. Fill in the outline (center) of the character in white.

This produced a nice character with a black border and white center for clarity. The problem is that it required two loops to complete. The idea of this patch is to combine these two steps into one. To do this an array is used to store the character's outline (the 2's) as well as its border (the 1's). This way, rather than using two loops, one is used. If a '2' is encountered, then a white pixel is drawn. If a '1' is encountered, then a black pixel is drawn.

Installation of Patch

cd <motion dir>
gunzip draw_change-0.01.patch.gz
patch -p1 < draw_change-0.01.patch
make clean
make
make install (as root if needed)

Change History of Patch

0.01 Initial Version. Do draw_textn in one step rather than two.

Discussion and Comments


I have many requests from people to implement scalable - or at least double size text.

We also have a problem with missing characters in non-english languages. At least the current code is pretty easy to expand with a few extra characters. This patch does not make it easier. We could comment the code more and make a Twiki page but that just proves that the text feature maybe needs a more general update than just a small speed update.

-- KennethLavrsen - 09 Jul 2005

Accepted but obsolute and included in TextScalingPatch
Topic revision: r3 - 02 Aug 2005, KennethLavrsen
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.