[Interest] QPainter drawLine zValue?
apoenitz at t-online.de
Wed Sep 25 22:58:49 CEST 2019
On Wed, Sep 25, 2019 at 12:28:17PM -0800, Israel Brewster wrote:
> > On Sep 25, 2019, at 12:26 PM, Jason H <jhihn at gmx.com> wrote:
> >> Sent: Wednesday, September 25, 2019 at 3:06 PM From: "Israel Brewster"
> >> <ijbrewster at alaska.edu> To: "Giuseppe D'Angelo" <giuseppe.dangelo at kdab.com> Cc:
> >> interest at qt-project.org Subject: Re: [Interest] QPainter drawLine zValue?
> >> On Sep 25, 2019, at 10:55 AM, Giuseppe D'Angelo via Interest
> >> <interest at qt-project.org> wrote:
> >>> Il 25/09/19 19:13, Israel Brewster ha scritto:
> >>>> Is there a way to set the Z value of the line drawn by the
> >>>> QPainter::DrawLine() function? I have a library that uses the drawLine
> >>>> function to create a grid, and I would like to keep the grid on the top as I
> >>>> draw other things, if possible. Thanks.
> >>> Can you draw the grid _last_?
> >>> There's no Z value (or Z buffer altogether) for QPainter. A new drawX command
> >>> draws directly to the target, honouring the composition mode for blending
> >>> source and destination together.
> >> Worth looking into. The drawing is actually being done by a third-party library
> >> (PyQtGraph), which makes it harder, but I’ve hacked it before to get it to do
> >> what I want, so I may be able to do the same here. I’ll have to dig into how it
> >> draws the various components. Thanks!
> > Use two things (Canvases?) separately then stack them on top of each other with
> > the grid on top?
> Now that could work. Thanks!
Is drawing the grid so expensive that you can't simply do that on each
update of the "lower levels"?
More information about the Interest