kicad-developers team mailing list archive
Mailing list archive
Re: [PATCH] Ruler tool asserts when mirrored text is visible
Maciej Suminski <maciej.suminski@xxxxxxx>
Thu, 30 Mar 2017 00:10:39 +0200
spf=pass (sender IP is 22.214.171.124) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1
Thank you John, I have just committed your patch.
There are basic Save()/Restore() functions, but IIRC they do not store
the font settings, but are mostly used to maintain the transformation
I am not sure about the best solution here. None of the drawing
functions make any assumptions about the used drawing settings (color,
line width, stroke/fill, etc.), so perhaps this should be the same for
texts. Alternatively there could be a Reset() function, but anyway you
are likely to set the text line width and size, so effectively you would
just restore the attributes. I am open to discuss other ideas.
On 03/29/2017 01:40 PM, John Beard wrote:
> Sorry, that patch doesn't have the right comment. Please use this one.
> On Wed, Mar 29, 2017 at 7:37 PM, John Beard <john.j.beard@xxxxxxxxx> wrote:
>> This resolves https://bugs.launchpad.net/kicad/+bug/1677210.
>> This is caused because the GAL ruler tool didn't reset its text
>> mirroring flag before drawing bitmap text. This means if the GAL had
>> just drawn mirrored text, it would be set, but this is invalid for
>> OpenGL bitmap fonts (and if it were, would still be incorrect).
>> I also reset bold/italic, though bitmaps text doesn't seem to care
>> about that at all.
>> This fixes the bug. In the longer run, this is still not really ideal,
>> as every draw-er on the GAL seems to need to reset every single
>> parametert that it might need. If a parameter is added, all these
>> "reset loci" need to be vetted for possibly adding or resetting that
>> Would some kind of stack mechanism make sense here? Unrelated
>> functions probably should start from a blank slate of some sort. Maybe
>> a way to avoid unnecessary stack shuffling if you /know/ you don't
>> need to reset GAL parameters and it's a performance hit to do so
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp