freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Drawing unfilled shapes with FreeType2


From: Werner LEMBERG
Subject: Re: [ft] Drawing unfilled shapes with FreeType2
Date: Sat, 08 Nov 2014 07:01:52 +0100 (CET)

> I want to apply a transformation matrix before letting FreeType draw
> the unfilled shape.  [...] the problem is that
> FT_Outline_Transform() will also apply the transformation matrix to
> the outline stroke size [...].
> 
> But I don't want this! I want FreeType to use a constant outline
> stroke size.  The outline stroke size should always be the value
> that has been set with FT_Stroker_Set().  Transformations shouldn't
> change the outline stroke size.  It should always be of size 8
> pixels or whatever has been set using FT_Stroker_Set().

I think this is impossible to do.  Having a stroked object,
transformation *must* change the outline strokes, too, or you get
unstable results.  Just think of a square rotated by 45 degrees that
gets scaled by (100,1) to make it extremely broad: Following your
idea, the strokes would no longer be properly connected in the top and
bottom corners because the angle between the square edges changes a
lot (from 90 degrees to almost 180 degrees).

In other words, strokes must always be applied to the final shape.  A
transformation matrix must be applied to the object before the
stroking process starts.

What about using `FT_Stroker_ParseOutline' after transformation of the
outline?


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]