Squeak Class Documentation category index | class index  
 
FormCanvas
  category: Morphic-Support
  superclass: Canvas
  subclasses: BalloonCanvas ColorPatchCanvas MultiResolutionCanvas

Note that when shadowDrawing is true, shadowStipple may be either a color, for a solid shadow of the given color, or it may be a stipple used to simulate gray shading when the display cannot support alpha blending.

instance methods
  accessing
  allocateForm:
clipRect
contentsOfArea:into:
depth
extent
form
origin
shadowColor
shadowColor:

  converting
  asShadowDrawingCanvas
asShadowDrawingCanvas:

  copying
  copy
copyClipRect:
copyOffset:
copyOffset:clipRect:
copyOrigin:clipRect:

  drawing
  fillColor:
line:to:brushForm:
line:to:width:color:
nebraskaText:bounds:font:color:
paragraph:bounds:color:
point:color:
render:
text:bounds:font:color:

  drawing-general
  roundCornersOf:during:

  drawing-images
  image:at:sourceRect:rule:
image:at:sourceRect:rule:alpha:
stencil:at:sourceRect:color:

  drawing-ovals
  balloonFillOval:fillStyle:borderWidth:borderColor:
fillOval:color:borderWidth:borderColor:
fillOval:fillStyle:borderWidth:borderColor:

  drawing-polygons
  drawPolygon:color:borderWidth:borderColor:
drawPolygon:fillStyle:borderWidth:borderColor:

  drawing-rectangles
  balloonFillRectangle:fillStyle:
fillRectangle:fillStyle:
frameAndFillRectangle:fillColor:borderWidth:borderColor:
frameAndFillRectangle:fillColor:borderWidth:topLeftColor:bottomRightColor:
infiniteFillRectangle:fillStyle:

  drawing-support
  clipBy:during:
transform2By:clippingTo:during:smoothing:
transformBy:clippingTo:during:smoothing:
translateBy:clippingTo:during:
translateBy:during:
translateTo:clippingTo:during:

  initialize-release
  finish
reset

  object fileIn
 

  other
  asBalloonCanvas
flushDisplay
forceToScreen:
printOn:
showAt:
showAt:invalidRects:
warpFrom:toRect:

  private
  portClass
privateClipRect
privatePort
resetGrafPort
setClearColor:
setFillColor:
setForm:
setOrigin:clipRect:
setPaintColor:
setStencilColor:form:

  testing
  isShadowDrawing
isVisible:

class methods
  instance creation
  extent:
extent:depth:
on:

  testing
  test1
test2
test3

instance methods
  accessing top  
 

allocateForm:

Allocate a new form which is similar to the receiver


 

clipRect

Return the currently active clipping rectangle


 

contentsOfArea:into:

Return the contents of the given area


 

depth


 

extent

Return the physical extent of the output device


 

form


 

origin

Return the current origin for drawing operations


 

shadowColor

Return the current override color or nil if no such color exists


 

shadowColor:

Set a shadow color. If set this color overrides any client-supplied color.


  converting top  
 

asShadowDrawingCanvas

Note: This is sort of an optimization here since since the logic is all there


 

asShadowDrawingCanvas:

Note: This is sort of an optimization here since since the logic is all there


  copying top  
 

copy

Make a copy the receiver on the same underlying Form but with its own grafPort.


 

copyClipRect:


 

copyOffset:


 

copyOffset:clipRect:

Make a copy of me offset by aPoint, and further clipped
by sourceClip, a rectangle in the un-offset coordinates


 

copyOrigin:clipRect:

Return a copy of this canvas with the given origin. The clipping rectangle of this canvas is the intersection of the given rectangle and the receiver's current clipping rectangle. This allows the clipping rectangles of nested clipping morphs to be composed.


  drawing top  
 

fillColor:

Note: This always fills, even if the color is transparent.


 

line:to:brushForm:

Obsolete - will be removed in the future


 

line:to:width:color:

Draw a line using the given width and color


 

nebraskaText:bounds:font:color:


 

paragraph:bounds:color:

Draw the given paragraph


 

point:color:

Obsolete - will be removed in the future


 

render:

Do some 3D operations with the object if possible


 

text:bounds:font:color:

Draw the given string in the given font and color clipped to the given rectangle. If the font is nil, the default font is used.


  drawing-general top  
 

roundCornersOf:during:


  drawing-images top  
 

image:at:sourceRect:rule:

Draw the portion of the given Form defined by sourceRect at the given point using the given BitBlt combination rule.


 

image:at:sourceRect:rule:alpha:

Draw the portion of the given Form defined by sourceRect at the given point using the given BitBlt combination rule.


 

stencil:at:sourceRect:color:

Flood this canvas with aColor wherever stencilForm has non-zero pixels


  drawing-ovals top  
 

balloonFillOval:fillStyle:borderWidth:borderColor:


 

fillOval:color:borderWidth:borderColor:

draw the border of the oval


 

fillOval:fillStyle:borderWidth:borderColor:

Fill the given oval.


  drawing-polygons top  
 

drawPolygon:color:borderWidth:borderColor:

Generalize for the BalloonCanvas


 

drawPolygon:fillStyle:borderWidth:borderColor:

Use a BalloonCanvas


  drawing-rectangles top  
 

balloonFillRectangle:fillStyle:


 

fillRectangle:fillStyle:

Fill the given rectangle.


 

frameAndFillRectangle:fillColor:borderWidth:borderColor:

Draw the rectangle using the given attributes


 

frameAndFillRectangle:fillColor:borderWidth:topLeftColor:bottomRightColor:

First use quick code for top and left borders and fill


 

infiniteFillRectangle:fillStyle:

this is a bit of a kludge to get the form to be aligned where I *think* it should be.
something better is needed, but not now


  drawing-support top  
 

clipBy:during:

Set a clipping rectangle active only during the execution of aBlock.
Note: In the future we may want to have more general clip shapes - not just rectangles


 

transform2By:clippingTo:during:smoothing:

an attempt to use #displayInterpolatedOn: instead of WarpBlt.


 

transformBy:clippingTo:during:smoothing:

Note: This method has been originally copied from TransformationMorph.


 

translateBy:clippingTo:during:

Set a translation and clipping rectangle only during the execution of aBlock.


 

translateBy:during:

Set a translation only during the execution of aBlock.


 

translateTo:clippingTo:during:

Set a new origin and clipping rectangle only during the execution of aBlock.


  initialize-release top  
 

finish

If there are any pending operations on the receiver complete them. Do not return before all modifications have taken effect.


 

reset

Reset the canvas.


  object fileIn top  

  other top  
 

asBalloonCanvas


 

flushDisplay

Dummy .


 

forceToScreen:

dummy


 

printOn:

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


 

showAt:


 

showAt:invalidRects:


 

warpFrom:toRect:


  private top  
 

portClass

Return the class used as port


 

privateClipRect


 

privatePort


 

resetGrafPort

Private! Create a new grafPort for a new copy.


 

setClearColor:

Install a new clear color - e.g., a color is used for clearing the background


 

setFillColor:

Install a new color used for filling.


 

setForm:


 

setOrigin:clipRect:


 

setPaintColor:

Install a new color used for filling.


 

setStencilColor:form:

Install a new color used for stenciling through FXBlt.
Stenciling in general is done mapping all colors of source form
to the stencil color and installing the appropriate source key.
However, due to possible transparency we may have to install the
color map as source map so that sourceForm gets mapped to a 32bit
ARGB pixel value before the color combination is done. If we don't
need translucency we can just use the regular color map (faster!)


  testing top  
 

isShadowDrawing


 

isVisible:

Optimization


class methods
  instance creation top  
 

extent:


 

extent:depth:


 

on:


  testing top  
 

test1

FormCanvas test1


 

test2

FormCanvas test2


 

test3

FormCanvas test3