octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54742] graphics root property "Units" cannot


From: Rik
Subject: [Octave-bug-tracker] [bug #54742] graphics root property "Units" cannot be set to characters
Date: Thu, 27 Sep 2018 12:38:52 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

Update of bug #54742 (project octave):

              Item Group:        Unexpected Error => Matlab Compatibility   
                  Status:               Confirmed => Ready For Test         

    _______________________________________________________

Follow-up Comment #2:

For the second question, take a look at graphics.cc.  The code below is from
the convert_position function.


  else if (from_units.compare ("characters"))
    {
      if (res <= 0)
        res = xget (0, "screenpixelsperinch").double_value ();

      double f = 0.0;

      // FIXME: this assumes the system font is Helvetica 10pt
      //        (for which "x" requires 6x12 pixels at 74.951 pixels/inch)
      f = 12.0 * res / 74.951;


I used these conversion factors in root_figure::properties::update_units to
add a "characters" conversion.  It seems to work, so I also added a BIST test
for it and pushed the change here:
https://hg.savannah.gnu.org/hgweb/octave/rev/7d3f666d0ef8.

Marking as Ready for Test.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54742>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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