octave-maintainers
[Top][All Lists]
Advanced

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

Re: Updaters and default property values (was :Changeset 14257 oddities)


From: Michael Goffioul
Subject: Re: Updaters and default property values (was :Changeset 14257 oddities)
Date: Mon, 12 Mar 2012 16:05:38 +0000

On Mon, Mar 12, 2012 at 3:48 PM, Ben Abbott <address@hidden> wrote:
> On Mar 12, 2012, at 10:10 AM, Michael Goffioul wrote:
>
>> On Mon, Mar 12, 2012 at 2:04 PM, Ben Abbott <address@hidden> wrote:
>>
>>> On Mar 12, 2012, at 5:41 AM, Michael Goffioul wrote:
>>>
>>>> On Mon, Mar 12, 2012 at 1:48 AM, Ben Abbott <address@hidden> wrote:
>>>>> Rik,
>>>>>
>>>>> I just realized the images produced for the docs are modifying the 
>>>>> default paperorientation to "landscape". The entire sequence is ...
>>>>>
>>>>> function set_print_size ()
>>>>>  image_size = [5.0, 3.5];
>>>>>  border = 0;
>>>>>  set (0, "defaultfigurepapertype", "<custom>");
>>>>>  set (0, "defaultfigurepaperorientation", "landscape");
>>>>>  set (0, "defaultfigurepapersize", image_size + 2*border);
>>>>>  set (0, "defaultfigurepaperposition", [border, border, image_size]);
>>>>> endfunction
>>>>>
>>>>> And when the defaults are populated into a new figure the updating of the 
>>>>> property values are not working as intended.
>>>>>
>>>>> This is causing the images for the figures to be rotated and cropped.
>>>>>
>>>>> I'm unfamiliar with how the initialization of an objects properties works.
>>>>>
>>>>> Can someone explain the process to me, or point me to code that does this?
>>>>
>>>> This is achieved in base_properties::set_from_list. This ends up
>>>> calling base_graphics_object::set, which will should end up calling
>>>> set_<property>.
>>>>
>>>> Michael.
>>>
>>> I took a quick look.  I think I'm following the part below
>>>
>>> graphics.cc (base_properties::set_from_list)
>>>
>>> But I don't see where base_graphics_object::set is defined.
>>
>> In the auto-generated graphics-prop.cc file.
>
> Do you mean to refer to base_properties::set() ?

Partially...
base_graphics_object::set() calls overridden versions of
base_properties::set(). Everything is auto-generated in
graphics-props.cc. For each graphics object, you have a method called
<object>::properties::set(). Each of these methods falls back to
calling base_properties::set().

Michael.


reply via email to

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