[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about graphics units updating
From: |
Ben Abbott |
Subject: |
Re: Question about graphics units updating |
Date: |
Fri, 10 Sep 2010 07:26:19 -0400 |
On Sep 9, 2010, at 9:32 PM, David Bateman wrote:
> I've been addressing the bug report #30519 as it is necessary to have the
> legend code working correctly. I started implementing a fix where the
> position, outerposition, etc values are stored in a particular unit and the
> get_position, set_position, etc function handles the conversion to the
> desired units. As I started with the axes and worked down to the root_figure
> class while implementing this, I didn't notice that the root windows
> screensize property is already treated, but it instead calls the
> update_units() method in the set_units() method to natively store the value
> in the desired units. So that the get_position, set_position, etc methods
> don't need to be modified.
>
> Whether one method is better than the other seems to me more a question of
> taste, and I have essentially all the other unit conversion functions
> written. However I find it displeasing to use two different techniques to
> perform the same manipulation of the graphics properties. Is there any reason
> to pick one method over the other? If so, which? If we can accept that there
> are two different means of performing this functionality depending on the
> graphics call then I'm almost ready to push a changeset.
>
> D.
My preference is that the values be stored in the default units and that
conversion be done during set(), get(). But either case will work.
More important, I think, is that there is only be one technique for units
conversion.
Ben