Re: XShrinkRegion() distorts shape
- From: boltar2003@xxxxxxxxxxxx
- Date: Thu, 9 Dec 2010 15:41:45 +0000 (UTC)
On 9 Dec 2010 15:33:11 GMT
jt@xxxxxxxxxxx (Jens Thoms Toerring) wrote:
From what you've said I fear you may be right. I suppose I shouldn't be
surprised that theres yet another poorly implemented feature in core Xlib.
What's "poorly implemented" about that? XLib is a the most
Umm , it doesn't work properly? I'd call that poorly implemented unless
you have a better definition.
low-level library. It isn't supposed to be hyper-clever, it
is supposed to be fast and small in terms of memort usage,
so that other people can write clever libraries on top of it,
not worrying about the speed of what they are building on.
Thats all very well , but if you can't be bothered to implement a feature
properly then don't bother to implement it at all. No one is going to
build a library on top of a broken feature, they'll simply write their
own version.
And storing all kinds of information about a shape a region
was created from could require a lot of memory and, to use
Far less memory I expect than images, stipples, tiles , pixmaps etc.
that information, a lot of computational effort that only a
very tiny percentage of the users would ever need. So it's
The XFill functionality isn't computationally simple either but they managed
to make that work properly.
actually need them. It's a bit like blaming a pixel format
for stroing a graphic for not being a vector format.
If I gave the server a pixmap and I wrote it to the screen corrupted then I
would blame it.
Or use a more clever algorithm, where you create a region from
the largest triangle that you ever expect to use, keep that and
shrink a copy of it each time instead of shrinking the original
region and then trying to blow it up again. That should take care
of all problems regarding distortions.
You're assuming the struct can be copied manually without any issues. What
if some implementations use pointers or heap memory internally? These
structures are supposed to be black boxes only updated via the API.
B2003
.
- Follow-Ups:
- Re: XShrinkRegion() distorts shape
- From: Jens Thoms Toerring
- Re: XShrinkRegion() distorts shape
- References:
- XShrinkRegion() distorts shape
- From: boltar2003
- Re: XShrinkRegion() distorts shape
- From: Jens Thoms Toerring
- Re: XShrinkRegion() distorts shape
- From: boltar2003
- Re: XShrinkRegion() distorts shape
- From: Jens Thoms Toerring
- XShrinkRegion() distorts shape
- Prev by Date: Re: XShrinkRegion() distorts shape
- Next by Date: Re: XShrinkRegion() distorts shape
- Previous by thread: Re: XShrinkRegion() distorts shape
- Next by thread: Re: XShrinkRegion() distorts shape
- Index(es):
Relevant Pages
|