Commit bbfad2df authored by Paul Asmuth's avatar Paul Asmuth
Browse files

wire up AXIS LABELS { INSIDE | OUTSIDE } ROTATE deg

parent 2b3ba6c9
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -66,6 +66,22 @@ AxisDefinition::kPosition AxisDefinition::getPosition() const {
  return position_;
}

void AxisDefinition::setLabelPosition(kLabelPosition pos) {
  printf("set label pos: %i", pos);
}

AxisDefinition::kLabelPosition AxisDefinition::getLabelPosition() const {
  return LABELS_INSIDE;
}

void AxisDefinition::setLabelRotation(double deg) {
  printf("axis label rot: %f\n", deg);
}

double AxisDefinition::getLabelRotation() const {
  return 0.0f;
}

void AxisDefinition::setTitle(const std::string& title) {
  title_ = title;
}
+21 −6
Original line number Diff line number Diff line
@@ -33,10 +33,10 @@ public:
  /**
   * The axis tick position
   */
  enum kTickPosition {
    TICKS_INSIDE = 0,
    TICKS_OUTSIDE = 1,
    TICKS_OFF = 2
  enum kLabelPosition {
    LABELS_INSIDE = 0,
    LABELS_OUTSIDE = 1,
    LABELS_OFF = 2
  };

  /**
@@ -95,9 +95,24 @@ public:
  kPosition getPosition() const;

  /**
   * Return the tick position for this axis
   * Set the label position for this axis
   */
  kTickPosition getTickPosition() const;
  void setLabelPosition(kLabelPosition pos);

  /**
   * Return the label position for this axis
   */
  kLabelPosition getLabelPosition() const;

  /**
   * Set the label rotation for this axis
   */
  void setLabelRotation(double deg);

  /**
   * Return the label rotaitoj for this axis
   */
  double getLabelRotation() const;

  /**
   * Set the title for this axis