-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug 82 - sub-pixel line width always results in 0 twip line width #22
Comments
strk@keybit.net 2009-05-20 05:39:17 EDT This is a known problem. Can't remember now if a new interface was added. Klaus ? |
Index: src/ming.h.inRCS file: /cvsroot/ming/ming/src/ming.h.in,v void SWFFill_setMatrix(SWFFill fill, float a, float b, /***** shape_util.h *****/ -void SWFShape_setLine(SWFShape shape, unsigned short width, -void SWFShape_setLine2Filled(SWFShape shape, unsigned short width, -void SWFShape_setLine2(SWFShape shape, unsigned short width, SWFFill SWFShape_addSolidFill(SWFShape shape, byte r, byte g, byte b, byte a); void SWFShape_setLeftFill(SWFShape shape, SWFFill fill); Index: src/shape_util.cRCS file: /cvsroot/ming/ming/src/shape_util.c,v /*
|
Philip de Nier 2009-03-14 11:02:01 EDT
Created an attachment (id=19) [details]
fix truncation of sub-pixel line widths
The functions to set the line width (in pixel units) in ming.h uses the
"unsigned short" type. The value is then multiplied by Ming_scale internally.
This means that a line width of < 1 pixel is stored as as a line width of 0
twips and flash renders this as a line with the minimum width.
The ming.h API should be changed to accept pixel unit line widths as a float so
that a pixel unit line width < 1 results in a twip unit line width of >= 0 and
< Ming_scale and not 0.
The attached patch file has this change.
p.s. it is a pity that 1 pixel and sub-pixel line widths look the same unless
you zoom in enough. The sub-pixel line would appear lighter in other formats.
The text was updated successfully, but these errors were encountered: