octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Graphics] More convenient backend access


From: Shai Ayal
Subject: Re: [Graphics] More convenient backend access
Date: Fri, 25 Jan 2008 17:05:39 +0200

On Jan 25, 2008 4:51 PM, Michael Goffioul <address@hidden> wrote:
> On Jan 25, 2008 3:07 PM, Shai Ayal <address@hidden> wrote:
> > > src/ChangeLog
> > >
> > > 2008-01-23  Michael Goffioul <address@hidden>
> > >
> > >     * graphics.h.in (base_properties::get_backend,
> > >     base_graphics_object::get_backend, graphics_backend::get_backend):
> > >     New methods for convenient access to the backend.
> > >     (figure::get_backend, figure::set_backend): Remove.
> > >     * graphics.cc (base_properties::get_backend): New method.
> > >     (Fdrawnow): Use graphics_object::get_backend to simplify code.
> > >
>
> Note: the above patch was to provide convenient access to
> the backend from C++ code, not for the user.
>
> > Michael, I'm not sure I understand how this works:
> > How does a new backend register?
>
> graphics_backend::register_backend (to be called when the
> new backend is loaded; for instance in an initialization
> function called from PKG_ADD).
>
> > How can the backend for a figure be set (by the user)?
> > How can the backend for a figure be read (get) by the user?
>
> There's no interface for this yet. My initial idea was to have
> a global variable (for instance "__backend__", or
> "default_backend") holding a string that would be used by
> graphics_backend::default_backend() to return the currently
> selected default backend. I didn't think yet about the
> possibility to change the backend dynamically. I guess
> this shouldn't be that hard to do; you just have to take care
> about closing the figure window before changing the backend.

well, how about a figure.backend property which you can set/get and
also set a default for in the usual way (in the root figure). Will
that work with your current implementation by just adding this
property and the appropriate set method (get is trivial) or is there
something I missed which will cause a major recode?

Shai

> Michael.
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]