[LIBART] linewidth scaling
- From: Robin Becker <robin jessikat fsnet co uk>
- To: libart gnome org
- Subject: [LIBART] linewidth scaling
- Date: Tue, 20 May 2003 19:55:25 +0100
Can anyone suggest an approach to linewidth scaling?
I have code that does the following
vpath = art_bez_path_to_vec(path, 0.25); /*bezier --> vector*/
trVpath = art_vpath_affine_transform(vpath, ctm); /*transformed vector path*/
svp = art_svp_vpath_stroke(trVpath,lineJoin, lineCap,linewidth, 4, 0.5);
and then renders the svp etc.
My problem is that we only have one linewidth so that whatever the
scaling of the whole curve the line width remains 1 or whatever I
set it to.
I can easily apply one of the scalings implied by the ctm,
but that will only be good if the scalings are near each other.
I see that there is code under the hood (of art_svp_vpath_stroke)
that scales linewidth according to the slope of the line segments
etc, but I have no way to tell the svp renderer that the 'pen' is
10 pixels wide and only 3 pixels high etc.
It seems I could do something by copying & modifying a lot of the code in
art_svp_vpath_stroke.c and passing in the extreme points of a transformed pen
instead of assuming pen symmetry.
Is there an easier way?
--
Robin Becker
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]