x11trace log, when using a pixmap sized (61, 61):
00:<:042e: 16: Request(53): CreatePixmap depth=0x01 pid=0x03e000e8 drawable=0x0
00002d5 width=61 height=61 [ … ]000:<:0434: 16: Request(55): CreateGC cid=0x03e000eb drawable=0x03e000e8 values={}
[ … ]000:<:043b: 88: Request(56): ChangeGC gc=0x03e000eb values={function=Set(0x0f) plane-mask=0xffffffff foreground=0x00000000 background=0x00000001 line-width=0 line-style=Solid(0x00) cap- style=Butt(0x01) join-style=Miter(0x00) fill-style=Solid(0x00) fill- rule=EvenOdd(0x00) tile-stipple-x-origin=0 tile-stipple-y-origin=0 subwindow- mode=ClipByChildren(0x00) graphics-exposures=true(0x01) clip-x-origin=0 clip- y-origin=0 clip-mask=None(0x00000000) dash-offset=0 arc-mode=PieSlice(0x01)} 000:<:043c: 24: Request(71): PolyFillArc drawable=0x03e000e8 gc=0x03e000eb arcs={x=0 y=0 w=61 h=61 angle1=0 angle2=23040};
The results from this is an arc that touches nicely on the right and the bottom side, but doesn't touch the top and the left borders at all, it's one pixel off. Row 0 and column 0 are unchanged, and the circle approaches and rounds on the second row and column.
Now, if I make the size of the arc even, if I change the pixmap to be 60x60, I get a slightly different result. The circle still touches the bottom and the right borders nicely, and on the top and the left border, there appears to be a single pixel at the center point. It looks something like this:
........X........ ...XXXXXXXXXXX... .XXXXXXXXXXXXXXX. XXXXXXXXXXXXXXXXXI'm using xorg 7.7 with the noveau driver. Any tips on drawing circles that touch all four boundary corners nicely? Artificially expanding the size of the circle boundaries, and using a clip mask, depending on whether the dimensions are odd or even, sounds hackish.
pgp9ZM5ZHTwhf.pgp
Description: PGP signature
_______________________________________________ xorg@lists.x.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.x.org/mailman/listinfo/xorg Your subscription address: %(user_address)s