Browse Source

add set_thickness

David Rose 22 years ago
parent
commit
d62dc09acf

+ 14 - 0
panda/src/parametrics/parametricCurveDrawer.cxx

@@ -223,6 +223,7 @@ get_num_ticks() const {
 void ParametricCurveDrawer::
 set_color(float r, float g, float b) {
   _lines.set_color(r, g, b);
+  redraw();
 }
 
 
@@ -235,8 +236,21 @@ set_color(float r, float g, float b) {
 void ParametricCurveDrawer::
 set_tick_color(float r, float g, float b) {
   _ticks.set_color(r, g, b);
+  redraw();
 }
 
+////////////////////////////////////////////////////////////////////
+//     Function: ParametricCurveDrawer::set_thickness
+//       Access: Public
+//  Description: Specifies the thickness of the line in pixels drawn
+//               to represent the curve.  Note that pixel thickness of
+//               a line segment is not supported by DirectX.
+////////////////////////////////////////////////////////////////////
+void ParametricCurveDrawer::
+set_thickness(float thick) {
+  _lines.set_thickness(thick);
+  redraw();
+}
 
 ////////////////////////////////////////////////////////////////////
 //     Function: ParametricCurveDrawer::set_frame_accurate

+ 2 - 0
panda/src/parametrics/parametricCurveDrawer.h

@@ -53,6 +53,8 @@ PUBLISHED:
   void set_color(float r, float g, float b);
   void set_tick_color(float r, float g, float b);
 
+  void set_thickness(float thick);
+
   void set_frame_accurate(bool frame_accurate);
   bool get_frame_accurate() const;