[cairo] Virtual surface
Behdad Esfahbod
behdad at behdad.org
Tue Aug 11 10:10:36 PDT 2009
On 08/11/2009 11:48 AM, Mike Emmel wrote:
> The problem is the cairo api clip scale etc are expected to be changed
> by the drawing code.
> There is no easy way to add and additional global clip and scale and
> potentially other features maybe for example a global transparency
> except to provide a surface that has these capabilities.
>
> This virtual surface provides the framework to wrap and existing
> surface to override or change or even replace the surface
> functionality with different modified operations.
>
> A custom scale and clip are two that we use now.
>
> The only way to achieve this with the current api would be to use and
> additional offscreen surface image for example and then blit the
> results back. By using this virtual surface you eliminate this
> indirection and blit for animation this is important.
The per-surface scale can be achieved using device_scale already. A
per-surface clip is also useful in GTK+ client-side rendering. Maybe it's
time to look into that.
behdad
>
>
> On Mon, Aug 10, 2009 at 9:38 AM, Behdad
> Esfahbod<behdad.esfahbod at gmail.com> wrote:
>> I have the same question as Joonas: what's a single-line statement of the
>> purpose of this virtual surface?
>>
>> behdad
>>
>> On 08/09/2009 11:49 AM, M Joonas Pihlaja wrote:
>>> Hi Mike,
>>>
>>> On Sat, 8 Aug 2009, Mike Emmel wrote:
>>>
>>>> Hi all I have a good start on a virtual surface backed by a real surface.
>>>> I've found it very useful for scaled widgets virtual screens and other
>>>> cases where you wan't the hard clipping provided by a surface and
>>>> other surface features but don't want a buffer or image surface. Such
>>>> as when the backing surface is already buffered.
>>> I scanned through the code real quick and it looks like it's all about
>>> proxying methods for another surface and also letting the user set the
>>> size and scale of the new surface. As far as I can tell, that's all
>>> it does though. Did I miss something else? I'm a little confused as
>>> to what purpose the virtual surface has and what exactly is "virtual"
>>> about it.
>>>
>>> I'm also not sure what you mean by using this virtual surface for
>>> clipping. Isn't it cairo_clip()'s purpose in life to clip your
>>> drawing for you?
>>>
>>> TIA,
>>>
>>> Joonas
>>> _______________________________________________
>>> cairo mailing list
>>> cairo at cairographics.org
>>> http://lists.cairographics.org/mailman/listinfo/cairo
>>>
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
More information about the cairo
mailing list