Squeak Class Documentation category index | class index  
 
StrokePoint
  category: Graphics-Tools-Simplification
  superclass: Object
  subclasses:

No comment. Sorry.

instance methods
  accessing
  backwardDirection
defineIntermediatePoint
forwardDirection
nextPoint
nextPoint:
position
position:
prevPoint
prevPoint:
removeIntermediatePoint

  enumerating
  do:

  flags
  isFinal
isFinal:
isProcessed
isProcessed:

  initialize
  on:
releaseCachedState

  intersecting
  intersectFrom:with:to:with:

  printing
  printOn:

class methods
  instance creation
  on:

instance methods
  accessing top  
 

backwardDirection

Compute the backward direction to the previous point in the stroke.


 

defineIntermediatePoint

Define an intermediate point for an extreme change in direction


 

forwardDirection

Compute the forward direction to the next point in the stroke.


 

nextPoint

Return the next point in the stroke


 

nextPoint:

Set the next point in the stroke


 

position

Return the position of the receiver


 

position:

Set the position of the receiver to aPoint


 

prevPoint

Return the previous point of the stroke


 

prevPoint:

Set the previous point of the stroke


 

removeIntermediatePoint

Remove an intermediate point for an extreme change in direction


  enumerating top  
 

do:


  flags top  
 

isFinal


 

isFinal:


 

isProcessed


 

isProcessed:


  initialize top  
 

on:


 

releaseCachedState


  intersecting top  
 

intersectFrom:with:to:with:

Compute the intersection of two lines, e.g., compute alpha and beta for
startPt + (alpha * startDir) = endPt + (beta * endDir).
Reformulating this yields
(alpha * startDir) - (beta * endDir) = endPt - startPt.
or
(alpha * startDir) + (-beta * endDir) = endPt - startPt.
or
(alpha * startDir x) + (-beta * endDir x) = endPt x - startPt x.
(alpha * startDir y) + (-beta * endDir y) = endPt y - startPt y.
which is trivial to solve using Cramer's rule. Note that since
we're really only interested in the intersection point we need only
one of alpha or beta since the resulting intersection point can be
computed based on either one.


  printing top  
 

printOn:

Append to the argument, aStream, a sequence of characters that
identifies the receiver.


class methods
  instance creation top  
 

on: