[cairo] Patch to allow Cairo-based software to print to laser cutters on Windows

Rick Yorgason rick at firefang.com
Thu Oct 18 18:11:17 UTC 2018


Including zero-width strokes makes sense to me. After all, true hairlines are supposed to act as though they're zero-width.

The reason I implemented it this way it's because I was worried about two use cases:

1) Some applications might rely on zero-width lines being invisible. (Imagine an artist who selects all the lines he wants to hide and changes their line width to zero.)

2) Maybe some CNC machines rely on zero-width lines? PS_COSMETIC lines are always 1 unit wide, so there would be no way to send zero-width lines to the printer any more. This seems unlikely to be a problem, but it's possible.

(1) can be fixed by the calling application, and (2) isn't likely a real problem, and if we include zero-width strokes it would make it easier for developers to make true zero-width hairlines (since they don't need to know the target device's minimum unit size), so I'm down for it.

-Rick-

On October 18, 2018 9:10:07 AM PDT, Carl Worth <cworth at cworth.org> wrote:
>On Wed, Oct 17 2018, Rick Yorgason wrote:
>> With this patch, I can use Inkscape to set my stroke width to 0.001"
>and 
>> it will cut through the material as expected.
>
>If we're going to have a magic value here, I think I'd be much happier
>to have 0 be the magic value.
>
>(I know that your code isn't actually making 0.001" be magic, but a
>whole range of values. I think I would really prefer to have that range
>include rather then exclude 0.0.)
>
>Does anyone see any reason why a stroke width of 0 shouldn't be treated
>this way?
>
>I think that would make a much better way to be able to document
>this. ("Use a value of 0 to get a PS_COSMETIC pen which is useful when
>targeting devices such as laser cutters".)
>
>And speaking of documentation, it seems this patch should also be
>touching up the documentation, such as in cairo_set_line_width?
>
>I know the code is specific to the Windows backend, but I think it's
>reasonable to put a backend-specific note into the general
>documentation
>in a case like this.
>
>-Carl

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cairographics.org/archives/cairo/attachments/20181018/ffc1df56/attachment.html>


More information about the cairo mailing list