octave-maintainers
[Top][All Lists]
Advanced

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

Re: [changeset] - improve clf() compatibility


From: Ben Abbott
Subject: Re: [changeset] - improve clf() compatibility
Date: Mon, 20 Oct 2008 21:05:21 -0400


On Oct 10, 2008, at 1:49 PM, Ben Abbott wrote:

On Friday, October 10, 2008, at 01:31PM, "John W. Eaton" <address@hidden > wrote:
On 10-Oct-2008, Ben Abbott wrote:

|
| On Oct 10, 2008, at 7:54 AM, Michael Goffioul wrote:
|
| > On Fri, Oct 10, 2008 at 1:46 PM, Ben Abbott <address@hidden> wrote:
| >>> What's missing here is probably "reset" function.
| >>>
| >>> Michael.
| >>
| >>
| >> Agreed.
| >>
| >> If I had a method available to inquire as to what the defaults
| >> were, that
| >> would be easy enough to impement. Do you imply that I am already
| >> able to
| >> determine the default property values?
| >
| > get(0, 'defaultfigurecolor') for instance
| >
| > However, implementing this in m-code will probably be rather
| > inefficient.
| > I guess a C++ implementation (maybe with some autogenerated code)
| > would be better suited.
| >
| > Michael.
|
| ok, that does work in Matlab, but not in Octave's 3.1.51+ branch. Does
| this functionality exist somewhere else?

However, setting default properties does work.  For example

figure (1);
get (1, "color")
  ==> [1, 1, 1]

close ("all");

set (0, "defaultfigurecolor", [0.1, 0.2, 0.3]);
figure (1);
get (1, "color")
  ==> [0.1, 0.2, 0.3]


I think getting defaults is just not completely implemented yet. Some
things do work.  For example, I see

set (0, "defaultfigurecolor", [0.1, 0.2, 0.3]);
get (0, "default")
ans =
{
  defaultfigurecolor =

     0.20000   0.20000   0.20000

}

get (0, "defaultfigurecolor")
ans =

   0.20000   0.20000   0.20000


but as you noted, this fails when the default has not been explicitly
set.  I guess that's just something that still needs to be done.

jwe

heck, it appears all of the defaults could be handled by the functions that create them. Is that what should be done, or should the defaults be handled at a lower level.

Ben

My inference regarding access to default property values was wrong. What is needed it a reset() function (likely built-in). I've requested such on another thread.

Additionally, when writing the changeset I submitted, I confused the "visible" property to be an indicator of handle visibility, rather than the object's visibility.

If I understand the visibility of handles correctly, allchild(h) returns all children, including those with hidden handles, and get(h,"children") returns the children with visible handles. Please correct me if I'm wrong.

If it is permissible to accept a changeset for clf() without the capability to reset the default propery values, please commit this one. Note that while I've included a call to reset(), it is not used unless requested.

Ben

Attachment: changeset-clf.patch
Description: Binary data



reply via email to

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