Home Segments Index Top Previous Next

677: Highlights

  • If you want to draw lines or display text, then extract a pen from the graph pane by sending a pen message:
    the graph pane method 
      | thePen | 
      thePen := self pen. 
      ... 
    

  • If you want to draw a line, then send the lineFrom:to: message to the pen:
    the pen lineFrom: start point to: end point 
    

  • If you want to display text, then send the displayText:at: or the centerText:at: message to the pen:
    the pen displayText: a string at: a point 
    the pen centerText: a string at: a point