[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ question:
From: |
David Kastrup |
Subject: |
Re: C++ question: |
Date: |
Fri, 20 Jan 2017 13:56:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Knut Petersen <address@hidden> writes:
>> Uh, you set the dimensions to 0,0 _after_ moving the thing to its place.
>> That would make the remaining point stick out seriously wide of the
>> actual glyph. Maybe move the set_empty before the translate_axis?
>
> Not even the following code shows any improvement:
>
> Stencil total;
> for (int i = 0; i < hyphens; i++)
> {
> Stencil ds = dash_stencil;
> ds.translate_axis (span_points[LEFT] + start_space +
> i * (dash_period + dash_length), X_AXIS);
> total.add_stencil (ds);
> if (whiteout > 0.0 )
> {
> Box wb (Interval (0, dash_length + 2 * whiteout * lt),
> Interval (h - whiteout * lt, h + th + whiteout * lt));
> Stencil ws;
> ws.set_empty(false);
> ws = (Lookup::round_filled_box (wb, 0.8 * lt));
> ws.set_empty(false);
> ws = ws.in_color (1.0, 0.0, 0.0);
> ws.translate_axis (span_points[LEFT] + start_space + i *
> (dash_period
> + dash_length) - whiteout * lt, X_AXIS);
> ws.set_empty(false);
> total.add_stencil (ws);
> total.set_empty(false);
> }
> }
>
> total.translate_axis (-me->relative_coordinate (common, X_AXIS), X_AXIS);
> total.set_empty(false);
> return total.smobbed_copy ();
> }
Sigh. Why do you use set_empty _after_ translation? That makes the
remaining point stick out from the actual glyph. And of course, it
totally moots any effect of set_empty before translation.
--
David Kastrup
- C++ question:, Knut Petersen, 2017/01/19
- Re: C++ question:, David Kastrup, 2017/01/20
- Re: C++ question:, Knut Petersen, 2017/01/20
- Re: C++ question:, David Kastrup, 2017/01/20
- Re: C++ question:, Knut Petersen, 2017/01/20
- Re: C++ question:,
David Kastrup <=
- Re: C++ question:, Knut Petersen, 2017/01/21
- Re: C++ question:, Knut Petersen, 2017/01/22
- Re: C++ question:, David Kastrup, 2017/01/22
- [PATCH] no-outline-stencil backend property, Knut Petersen, 2017/01/24
- Re: [PATCH] no-outline-stencil backend property, David Kastrup, 2017/01/24
- Re: [PATCH] no-outline-stencil backend property, Knut Petersen, 2017/01/24
- Re: [PATCH] no-outline-stencil backend property, David Kastrup, 2017/01/24
- Re: [PATCH] no-outline-stencil backend property, David Kastrup, 2017/01/24
- Re: [PATCH] no-outline-stencil backend property, David Kastrup, 2017/01/24