Re: Re: an issue with circles in circles
Nathan smith <[email protected]> Sat, 13 Nov 2021 23:39:09 +0000
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Thanks Tim, this was just the thing. Nathan On 11/11/2021 21:22, Tim Roberts wrote: > Sort of. By default, circles are filled. The perimeter is drawn with > the pen, the inside is drawn with a brush. You just need to set an > empty brush. > > dc.SetBrush(*wxTRANSPARENT_BRUSH); > > On Wednesday, November 10, 2021 at 4:33:01 PM UTC-8 > [email protected] wrote: > > Hi there, > > > I'm having a little issue with drawing a circle within a circle, > within > a cirlce. > > I've bound to the wx.EVT_PAINT event, have a black pen with width > 4 and > color black on a unmodified frame background. > > > The following code draws a box on the screen and splits it up the > middle: > > size=self.GetClientSize() > tpx=int(size.x/10) > tpy=int(size.y/10) > dc.DrawLine(tpx*2, tpy*2, tpx*8, tpy*2) > dc.DrawLine(tpx*2, tpy*8, tpx*8, tpy*8) > dc.DrawLine(tpx*2, tpy*2, tpx*2, tpy*8) > dc.DrawLine(tpx*8, tpy*2, tpx*8, tpy*8) > dc.DrawLine(tpx*5, tpy*2, tpx*5, tpy*8) > > > The following two variables set the center point for the left and > right > boxes. > > lc=[int(tpx*4), tpy*4] > rc=[int(tpx*6), tpy*4] > > > I have a list of numbers like the following: > > shells=[[4, []], [6, []], [8, []] > > > I then draw the circles as follows: > > for x in shells: > > dc.DrawCircle(lc[0], lc[1], (size.x/100)*x[0]) > > > When this code is run, it draws the first central circle when it is > added, but the more circles i add to the list, instead of drawing > circle > B around Circle A, it deletes Circle A and just draws a bigger > circle B. > > Is this to do with overlapping backgrounds? > > I'm confused! > > > Best, > > Nathan > > -- > You received this message because you are subscribed to the Google > Groups "wxPython-users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/wxpython-users/3e84b68c-5431-40a7-9529-c26bae697e05n%40googlegroups.com > <https://groups.google.com/d/msgid/wxpython-users/3e84b68c-5431-40a7-9529-c26bae697e05n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/08075b61-bdfe-bf9d-0425-522605dae740%40gmail.com.