Squeak Class Documentation category index | class index  
 
BalloonEnginePlugin
  category: VMConstruction-Plugins
  superclass: BalloonEngineBase
  subclasses: BalloonEngineSimulation

No comment. Sorry.

instance methods
  GET processing
  checkedAddBezierToGET:
checkedAddEdgeToGET:
checkedAddLineToGET:

  accessing beziers
  bezierEndXOf:
bezierEndXOf:put:
bezierEndYOf:
bezierEndYOf:put:
bezierFinalXOf:
bezierFinalXOf:put:
bezierUpdateDataOf:
bezierViaXOf:
bezierViaXOf:put:
bezierViaYOf:
bezierViaYOf:put:
bzEndX:
bzEndX:put:
bzEndY:
bzEndY:put:
bzStartX:
bzStartX:put:
bzStartY:
bzStartY:put:
bzViaX:
bzViaX:put:
bzViaY:
bzViaY:put:
wideBezierEntryOf:
wideBezierEntryOf:put:
wideBezierExitOf:
wideBezierExitOf:put:
wideBezierExtentOf:
wideBezierExtentOf:put:
wideBezierFillOf:
wideBezierFillOf:put:
wideBezierUpdateDataOf:
wideBezierWidthOf:
wideBezierWidthOf:put:

  accessing bitmaps
  bitmapCmSizeOf:
bitmapCmSizeOf:put:
bitmapDepthOf:
bitmapDepthOf:put:
bitmapHeightOf:
bitmapHeightOf:put:
bitmapRasterOf:
bitmapRasterOf:put:
bitmapSizeOf:
bitmapSizeOf:put:
bitmapTileFlagOf:
bitmapTileFlagOf:put:
bitmapWidthOf:
bitmapWidthOf:put:
colormapOf:

  accessing fills
  fillDirectionXOf:
fillDirectionXOf:put:
fillDirectionYOf:
fillDirectionYOf:put:
fillNormalXOf:
fillNormalXOf:put:
fillNormalYOf:
fillNormalYOf:put:
fillOriginXOf:
fillOriginXOf:put:
fillOriginYOf:
fillOriginYOf:put:

  accessing gradients
  gradientRampLengthOf:
gradientRampLengthOf:put:
gradientRampOf:

  accessing lines
  lineEndXOf:
lineEndXOf:put:
lineEndYOf:
lineEndYOf:put:
lineErrorAdjDownOf:
lineErrorAdjDownOf:put:
lineErrorAdjUpOf:
lineErrorAdjUpOf:put:
lineErrorOf:
lineErrorOf:put:
lineXDirectionOf:
lineXDirectionOf:put:
lineXIncrementOf:
lineXIncrementOf:put:
lineYDirectionOf:
lineYDirectionOf:put:
wideLineEntryOf:
wideLineEntryOf:put:
wideLineExitOf:
wideLineExitOf:put:
wideLineExtentOf:
wideLineExtentOf:put:
wideLineFillOf:
wideLineFillOf:put:
wideLineWidthOf:
wideLineWidthOf:put:

  allocation
  allocateBezier
allocateBezierStackEntry
allocateBitmapFill:colormap:
allocateGradientFill:rampWidth:isRadial:
allocateLine
allocateWideBezier
allocateWideLine

  bezier-loading
  assureValue:between:and:
computeBezier:splitAt:
computeBezierSplitAtHalf:
loadAndSubdivideBezierFrom:via:to:isWide:
loadBezier:segment:leftFill:rightFill:offset:
loadOval:lineFill:leftFill:rightFill:
loadOvalSegment:w:h:cx:cy:
loadWideBezier:lineFill:leftFill:rightFill:n:
subdivideBezier:
subdivideBezierFrom:
subdivideToBeMonoton:inX:
subdivideToBeMonotonInX:
subdivideToBeMonotonInY:

  beziers-simple
  stepToFirstBezier
stepToFirstBezierIn:at:
stepToNextBezier
stepToNextBezierForward:at:
stepToNextBezierIn:at:

  beziers-wide
  adjustWideBezierLeft:width:offset:endX:
adjustWideBezierRight:width:offset:endX:
computeFinalWideBezierValues:width:
returnWideBezierFill
returnWideBezierWidth
stepToFirstWideBezier
stepToFirstWideBezierIn:at:
stepToNextWideBezier
stepToNextWideBezierIn:at:

  fills-bitmaps
  bitmapValue:bits:atX:y:
clampValue:max:
fillBitmapSpan
fillBitmapSpan:from:to:at:
fillBitmapSpanAA:from:to:at:
loadBitmapFill:colormap:tile:from:along:normal:xIndex:
loadBitsFrom:
repeatValue:max:

  fills-gradient
  fillLinearGradient
fillLinearGradient:from:to:at:
fillLinearGradientAA:ramp:ds:dsX:from:to:
fillRadialDecreasing:ramp:deltaST:dsX:dtX:from:to:
fillRadialDecreasingAA:ramp:deltaST:dsX:dtX:from:to:
fillRadialGradient
fillRadialGradient:from:to:at:
fillRadialIncreasing:ramp:deltaST:dsX:dtX:from:to:
fillRadialIncreasingAA:ramp:deltaST:dsX:dtX:from:to:
loadFillOrientation:from:along:normal:width:height:
loadGradientFill:from:along:normal:isRadial:

  lines-loading
  loadLine:from:to:offset:leftFill:rightFill:
loadRectangle:lineFill:leftFill:rightFill:
loadWideLine:from:to:lineFill:leftFill:rightFill:

  lines-simple
  stepToFirstLine
stepToFirstLineIn:at:
stepToNextLine
stepToNextLineIn:at:

  lines-wide
  adjustWideLine:afterSteppingFrom:to:
returnWideLineFill
returnWideLineWidth
stepToFirstWideLine
stepToFirstWideLineIn:at:
stepToNextWideLine
stepToNextWideLineIn:at:

  primitives
  primitiveAddBezier
primitiveAddBezierShape
primitiveAddBitmapFill
primitiveAddCompressedShape
primitiveAddGradientFill
primitiveAddLine
primitiveAddOval
primitiveAddPolygon
primitiveAddRect
primitiveGetBezierStats

  private
  absoluteSquared8Dot24:
circleCosTable
circleSinTable
loadPointIntAt:from:
loadPointShortAt:from:
makeRectFromPoints
offsetFromWidth:
rShiftTable
shortRunLengthAt:from:
shortRunValueAt:from:

  shapes-compressed
  checkCompressedFillIndexList:max:segments:
checkCompressedFills:
checkCompressedLineWidths:segments:
checkCompressedPoints:segments:
checkCompressedShape:segments:leftFills:rightFills:lineWidths:lineFills:fillIndexList:
loadCompressedSegment:from:short:leftFill:rightFill:lineWidth:lineColor:
loadCompressedShape:segments:leftFills:rightFills:lineWidths:lineFills:fillIndexList:pointShort:

  shapes-polygons
  loadArrayPolygon:nPoints:fill:lineWidth:lineFill:
loadArrayShape:nSegments:fill:lineWidth:lineFill:
loadPolygon:nPoints:fill:lineWidth:lineFill:pointsShort:
loadShape:nSegments:fill:lineWidth:lineFill:pointsShort:

  testing
  isBezier:
isFillOkay:
isLine:
isWideBezier:
isWideLine:

class methods
  class initialization
  declareCVarsIn:

instance methods
  GET processing top  
 

checkedAddBezierToGET:

Add the bezier to the global edge table if it intersects the clipping region


 

checkedAddEdgeToGET:

Add the edge to the global edge table.
For known edge types, check if the edge intersects the visible region


 

checkedAddLineToGET:

Add the line to the global edge table if it intersects the clipping region


  accessing beziers top  
 

bezierEndXOf:


 

bezierEndXOf:put:


 

bezierEndYOf:


 

bezierEndYOf:put:


 

bezierFinalXOf:


 

bezierFinalXOf:put:


 

bezierUpdateDataOf:


 

bezierViaXOf:


 

bezierViaXOf:put:


 

bezierViaYOf:


 

bezierViaYOf:put:


 

bzEndX:


 

bzEndX:put:


 

bzEndY:


 

bzEndY:put:


 

bzStartX:


 

bzStartX:put:


 

bzStartY:


 

bzStartY:put:


 

bzViaX:


 

bzViaX:put:


 

bzViaY:


 

bzViaY:put:


 

wideBezierEntryOf:


 

wideBezierEntryOf:put:


 

wideBezierExitOf:


 

wideBezierExitOf:put:


 

wideBezierExtentOf:


 

wideBezierExtentOf:put:


 

wideBezierFillOf:


 

wideBezierFillOf:put:


 

wideBezierUpdateDataOf:


 

wideBezierWidthOf:


 

wideBezierWidthOf:put:


  accessing bitmaps top  
 

bitmapCmSizeOf:


 

bitmapCmSizeOf:put:


 

bitmapDepthOf:


 

bitmapDepthOf:put:


 

bitmapHeightOf:


 

bitmapHeightOf:put:


 

bitmapRasterOf:


 

bitmapRasterOf:put:


 

bitmapSizeOf:


 

bitmapSizeOf:put:


 

bitmapTileFlagOf:


 

bitmapTileFlagOf:put:


 

bitmapWidthOf:


 

bitmapWidthOf:put:


 

colormapOf:


  accessing fills top  
 

fillDirectionXOf:


 

fillDirectionXOf:put:


 

fillDirectionYOf:


 

fillDirectionYOf:put:


 

fillNormalXOf:


 

fillNormalXOf:put:


 

fillNormalYOf:


 

fillNormalYOf:put:


 

fillOriginXOf:


 

fillOriginXOf:put:


 

fillOriginYOf:


 

fillOriginYOf:put:


  accessing gradients top  
 

gradientRampLengthOf:


 

gradientRampLengthOf:put:


 

gradientRampOf:


  accessing lines top  
 

lineEndXOf:


 

lineEndXOf:put:


 

lineEndYOf:


 

lineEndYOf:put:


 

lineErrorAdjDownOf:


 

lineErrorAdjDownOf:put:


 

lineErrorAdjUpOf:


 

lineErrorAdjUpOf:put:


 

lineErrorOf:


 

lineErrorOf:put:


 

lineXDirectionOf:


 

lineXDirectionOf:put:


 

lineXIncrementOf:


 

lineXIncrementOf:put:


 

lineYDirectionOf:


 

lineYDirectionOf:put:


 

wideLineEntryOf:


 

wideLineEntryOf:put:


 

wideLineExitOf:


 

wideLineExitOf:put:


 

wideLineExtentOf:


 

wideLineExtentOf:put:


 

wideLineFillOf:


 

wideLineFillOf:put:


 

wideLineWidthOf:


 

wideLineWidthOf:put:


  allocation top  
 

allocateBezier


 

allocateBezierStackEntry


 

allocateBitmapFill:colormap:


 

allocateGradientFill:rampWidth:isRadial:


 

allocateLine


 

allocateWideBezier


 

allocateWideLine


  bezier-loading top  
 

assureValue:between:and:

Make sure that val1 is between val2 and val3.


 

computeBezier:splitAt:

Split the bezier curve at the given parametric value.
Note: Since this method is only invoked to make non-monoton
beziers monoton we must check for the resulting y values
to be *really* between the start and end value.


 

computeBezierSplitAtHalf:

Split the bezier curve at 0.5.


 

loadAndSubdivideBezierFrom:via:to:isWide:

Load and subdivide the bezier curve from point1/point2/point3.
If wideFlag is set then make sure the curve is monoton in X.


 

loadBezier:segment:leftFill:rightFill:offset:

Initialize the bezier segment stored on the stack


 

loadOval:lineFill:leftFill:rightFill:

Load a rectangular oval currently defined by point1/point2


 

loadOvalSegment:w:h:cx:cy:


 

loadWideBezier:lineFill:leftFill:rightFill:n:

Load the (possibly wide) bezier from the segments currently on the bezier stack.


 

subdivideBezier:

Subdivide the given bezier curve if necessary


 

subdivideBezierFrom:

Recursively subdivide the curve on the bezier stack.


 

subdivideToBeMonoton:inX:

Check if the given bezier curve is monoton in Y, and, if desired in X.
If not, subdivide it


 

subdivideToBeMonotonInX:

Check if the given bezier curve is monoton in X. If not, subdivide it


 

subdivideToBeMonotonInY:

Check if the given bezier curve is monoton in Y. If not, subdivide it


  beziers-simple top  
 

stepToFirstBezier

Initialize the current entry in the GET by stepping to the current scan line


 

stepToFirstBezierIn:at:

Initialize the bezier at yValue.
TODO: Check if reducing maxSteps from 2*deltaY to deltaY
brings a *significant* performance improvement.
In theory this should make for double step performance
but will cost in quality. Might be that the AA stuff will
compensate for this - but I'm not really sure.


 

stepToNextBezier

Process the current entry in the AET by stepping to the next scan line


 

stepToNextBezierForward:at:

Incrementally step to the next scan line in the given bezier update data.
Note: This method has been written so that inlining works, e.g.,
not declaring updateData as 'int*' but casting it on every use.


 

stepToNextBezierIn:at:

Incrementally step to the next scan line in the given bezier


  beziers-wide top  
 

adjustWideBezierLeft:width:offset:endX:

Adjust the wide bezier curve (dx < 0) to start/end at the right point


 

adjustWideBezierRight:width:offset:endX:

Adjust the wide bezier curve (dx >= 0) to start/end at the right point


 

computeFinalWideBezierValues:width:

Get both values from the two boundaries of the given bezier
and compute the actual position/width of the line


 

returnWideBezierFill


 

returnWideBezierWidth


 

stepToFirstWideBezier

Initialize the current entry in the GET by stepping to the current scan line


 

stepToFirstWideBezierIn:at:

Initialize the bezier at yValue


 

stepToNextWideBezier

Initialize the current entry in the GET by stepping to the current scan line


 

stepToNextWideBezierIn:at:

Incrementally step to the next scan line in the given wide bezier


  fills-bitmaps top  
 

bitmapValue:bits:atX:y:


 

clampValue:max:


 

fillBitmapSpan


 

fillBitmapSpan:from:to:at:


 

fillBitmapSpanAA:from:to:at:


 

loadBitmapFill:colormap:tile:from:along:normal:xIndex:

Load the bitmap fill.


 

loadBitsFrom:

Note: Assumes that the contents of formArray has been checked before


 

repeatValue:max:


  fills-gradient top  
 

fillLinearGradient


 

fillLinearGradient:from:to:at:

Draw a linear gradient fill.


 

fillLinearGradientAA:ramp:ds:dsX:from:to:

This is the AA version of linear gradient filling.


 

fillRadialDecreasing:ramp:deltaST:dsX:dtX:from:to:

Part 2a) Compute the decreasing part of the ramp


 

fillRadialDecreasingAA:ramp:deltaST:dsX:dtX:from:to:

Part 2a) Compute the decreasing part of the ramp


 

fillRadialGradient


 

fillRadialGradient:from:to:at:

Draw a radial gradient fill.


 

fillRadialIncreasing:ramp:deltaST:dsX:dtX:from:to:

Part 2b) Compute the increasing part of the ramp


 

fillRadialIncreasingAA:ramp:deltaST:dsX:dtX:from:to:

Part 2b) Compute the increasing part of the ramp


 

loadFillOrientation:from:along:normal:width:height:

Transform the points


 

loadGradientFill:from:along:normal:isRadial:

Load the gradient fill as defined by the color ramp.


  lines-loading top  
 

loadLine:from:to:offset:leftFill:rightFill:

Load the line defined by point1 and point2.


 

loadRectangle:lineFill:leftFill:rightFill:

Load a rectangle currently defined by point1-point4


 

loadWideLine:from:to:lineFill:leftFill:rightFill:

Load a (possibly wide) line defined by the points p1 and p2


  lines-simple top  
 

stepToFirstLine

Initialize the current entry in the GET by stepping to the current scan line


 

stepToFirstLineIn:at:

Initialize the line at yValue


 

stepToNextLine

Process the current entry in the AET by stepping to the next scan line


 

stepToNextLineIn:at:

Incrementally step to the next scan line in the given line


  lines-wide top  
 

adjustWideLine:afterSteppingFrom:to:

Adjust the wide line after it has been stepped from lastX to nextX.
Special adjustments of line width and start position are made here
to simulate a rectangular brush


 

returnWideLineFill

Return the fill of the (wide) line - this method is called from a case.


 

returnWideLineWidth

Return the width of the (wide) line - this method is called from a case.


 

stepToFirstWideLine

Initialize the current entry in the GET by stepping to the current scan line


 

stepToFirstWideLineIn:at:

Initialize the wide line at yValue.


 

stepToNextWideLine

Process the current entry in the AET by stepping to the next scan line


 

stepToNextWideLineIn:at:

Incrementally step to the next scan line in the given wide line


  primitives top  
 

primitiveAddBezier


 

primitiveAddBezierShape


 

primitiveAddBitmapFill


 

primitiveAddCompressedShape


 

primitiveAddGradientFill


 

primitiveAddLine


 

primitiveAddOval


 

primitiveAddPolygon


 

primitiveAddRect


 

primitiveGetBezierStats


  private top  
 

absoluteSquared8Dot24:

Compute the squared value of a 8.24 number with 0.0 <= value < 1.0,
e.g., compute (value * value) bitShift: -24


 

circleCosTable


 

circleSinTable


 

loadPointIntAt:from:

Load the int value from the given index in intArray


 

loadPointShortAt:from:

Load the short value from the given index in shortArray


 

makeRectFromPoints


 

offsetFromWidth:

Common function so that we don't compute that wrong in any place
and can easily find all the places where we deal with one-pixel offsets.


 

rShiftTable


 

shortRunLengthAt:from:

Return the run-length value from the given ShortRunArray.


 

shortRunValueAt:from:

Return the run-length value from the given ShortRunArray.
Note: We don't need any coercion to short/int here, since
we deal basically only with unsigned values.


  shapes-compressed top  
 

checkCompressedFillIndexList:max:segments:

Check the fill indexes in the run-length encoded fillList


 

checkCompressedFills:

Check if the indexList (containing fill handles) is okay.


 

checkCompressedLineWidths:segments:

Check the run-length encoded lineWidthList matches nSegments


 

checkCompressedPoints:segments:

Check if the given point array can be handled by the engine.


 

checkCompressedShape:segments:leftFills:rightFills:lineWidths:lineFills:fillIndexList:

Check if the given shape can be handled by the engine.
Since there are a number of requirements this is an extra method.


 

loadCompressedSegment:from:short:leftFill:rightFill:lineWidth:lineColor:

Load the compressed segment identified by segment index


 

loadCompressedShape:segments:leftFills:rightFills:lineWidths:lineFills:fillIndexList:pointShort:

Load a compressed shape into the engine.
WARNING: THIS METHOD NEEDS THE FULL FRAME SIZE!!!!


  shapes-polygons top  
 

loadArrayPolygon:nPoints:fill:lineWidth:lineFill:


 

loadArrayShape:nSegments:fill:lineWidth:lineFill:


 

loadPolygon:nPoints:fill:lineWidth:lineFill:pointsShort:


 

loadShape:nSegments:fill:lineWidth:lineFill:pointsShort:


  testing top  
 

isBezier:


 

isFillOkay:


 

isLine:


 

isWideBezier:


 

isWideLine:


class methods
  class initialization top  
 

declareCVarsIn:

Nothing to declare