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

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

[Octave-bug-tracker] [bug #58429] Export of plotted circles to SVG could


From: Rik
Subject: [Octave-bug-tracker] [bug #58429] Export of plotted circles to SVG could use SVG circle primitive
Date: Mon, 25 May 2020 14:36:47 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #4, bug #58429 (project octave):

If it helps, the marker drawing code for 'o' is in gl-render.cc at line 4676. 
Reproduced below.


case 'o':
  {
    int div = static_cast<int> (M_PI * sz / 4);
    if (! (div % 2))
      div += 1;               // ensure odd number for left/right symmetry
    div = std::max (div, 5);  // ensure at least a few vertices are drawn
    double ang_step = M_PI / div;

    m_glfcns.glBegin (filled ? GL_POLYGON : GL_LINE_LOOP);
    for (double ang = 0; ang < 2*M_PI; ang += ang_step)
      m_glfcns.glVertex2d (sz/2*cos (ang), sz/2*sin (ang));
    m_glfcns.glEnd ();
  }


 


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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