kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28262
Re: GerbView GAL: issue with draw order and negative items
-
To:
Jon Evans <jon@xxxxxxxxxxxxx>, KiCad Developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Tomasz Wlostowski <tomasz.wlostowski@xxxxxxx>
-
Date:
Mon, 27 Feb 2017 12:10:02 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.46) 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;
-
In-reply-to:
<CA+qGbCCFFLC_6gyK=-rVBR6fj-mVAtrjJCmrGbKA+9WNO8aKXw@mail.gmail.com>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1
On 26.02.2017 20:49, Jon Evans wrote:
> Hi all,
>
> I've run into a problem while porting GerbView to GAL that doesn't have
> (...)
> Another would be to implement some sort of render order sorting inside
> VIEW, but I haven't looked in to that much yet, so I'm not sure how
> complicated it would be.
>
> Does anyone have suggestions for this problem?
Hi Jon,
Many thanks for your excellent work.
One of possible ways to solve your problem is to:
- Add an additional field (say, m_drawPriority) in VIEW_ITEM_DATA
containing the drawing priority
- Modify VIEW::redrawRect() and VIEW::drawItem to first collect all
drawable items, sort them by m_drawPriority and then draw.
- The m_drawPriority could be accessed by additional methods in the VIEW
class and by default initialized to subsequent values as items are added
to a VIEW.
- Sorting could be optional, for large PCB views it might affect
performance.
Cheers,
Tom
PS. If you have time, feel free to C++11-ize the VIEW code ;-)
>
> Thanks,
> Jon
>
>
> _______________________________________________
> 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
>
Follow ups
References