Re: proposal: gdk_draw_focus_rectangle

At 12:24 24.05.01 -0400, Owen Taylor wrote:
>Hans Breuer <hans breuer org> writes:
>> To give you an impression of what is possible with standard
>> GDI functions I've attached a small image. 
>> It contains vertical lines with all available linestyles.
>> The border is drawn with DrawFocusRect().
>Hmmm, this is pretty limiting. But I can't believe that it isn't
>possible to draw a 1-pixel dotted line in Win32 at a somewhat
>reasonable speed.
>(Note that I'm pretty positive that drawing focus rectangles as a 
>series of points would be fast enough.)
If I would get only 1 MHz for every function where you think
win32 is fast enough, at least my machine would be fast enough :-)

>One possibility, is that for rectangles and 1 pixel horizontal
>and vertical lines, if you have a functional stipple implementation,

Do you remember the "New default theme"-thread and my mentioning 
that there currently is only a limited Stiple/Tile implementation 
(mostly because neither Gimp nor Gtk did require it at the point
where Tor was implementing it). But there are again nice backend
issues like limited 'brush' size ...

>> [...]
>> IMO it would be a really small compromise to wrap the focus
>> rectangle drawing into it's own gdk function, but obviously
>> it is simplier to put all the burden on the non X backends ...
>Suprisingly, I'm not actually out to screw the Win32 backend.
>(If we didn't care about Win32, well, we wouldn't have incorporated
>into the GTK+ tree, we wouldn't have spent the time to virtualize
>GDK, and so forth.)
The win32 port out of the time before it is still running better
or at least much faster than current cvs.

>However, I think your proposal doesn't quite fit into the way
>that GTK+/GDK works.
> - GDK is about drawing graphics primitives
> - These primitives should behave (as much as possible) the same on
>   all platforms.
> - How widgets are drawn depends is up to the widget implementation
>   and theme.
>So, either DrawFocus() is deterministic, and your proposal boils
>down to adding a:
> "draw a dotted xor'ed rectangle"
>primitive to GDK, or you are proposing a drawing call that could
>be different on different backends. Neither seems right to me.
Fine with me. I simply put this on my list of dropped 
patches/proposals than.

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]