Environment: Siren
Instances of DisplayList are used for representing composed structured graphics. They can be nested (see the class examples) and can display themselves and their components.
Instance Variables:
accessing
offset
flatten
Answer a copy of the receiver with its hierarchy flattened.
itemsFromX: x1 toX: x2
Answer the list of items whose offsets are within the given X range.
itemsIntersecting: rect
Answer the list of items whose boundingBoxes intersect the given rectangle.
Clip them to the box's border if necessary.
itemsWithin: rect
Answer the list of items whose boundingBoxes are entirely within the given rectangle.
itemsWithin: dist of: point
Answer the list of items whose boundingBoxes are entirely within the given rectangle.
itemWithin: dist of: point
Answer the list of items whose boundingBoxes are entirely within the given rectangle.
modelsFromX: x1 toX: x2
Answer the list of model-space-items whose offsets are within the given X range.
nodeAt: aPath
Answer the element described by the collection of items in the argument.
nodeFor: aModel
Answer the element whose model is the argument.
offset
Answer the receiver's offset.
offset: aPoint
Set the receiver's offset.
wrapperClass
Raise an error.
transforming
Scale the receiver's offset by the argument.
translateBy: aPoint
Translate the receiver's offset by the argument.
printing
Descend the hierarchy printing on the stream.
printCompletePostScriptOn: aStream depth: depth
Descend the hierarchy printing on the stream.
printOn: aStream
Print the receiver on the argument using the recursive method.
printPostScriptOn: aStream
Print the receiver on the argument using the recursive method.
testing
Answer whether or not the receiver has items or components.
isEmpty
Amswer whether the receiver has any items.
bounds accessing
Compute the receiver's preferredBounds
extent
Answer the extent of the receiver.
enumerating
Iterate the argument block over the receiver's components.
displaying
Open a DisplayListView on the receiver.
displayNonCached
Open a DisplayListView on the receiver.
displayOn: aGraphicsContext
Display each of the receiver's components.
displayPostScriptOn: aPostscriptContext
Display each of the receiver's components.
adding-removing
Add the argument to the receiver.
add: aVisualComponent at: aPoint
Add aVisualComponent to the receiver's components with its offset set to aPoint.
add: anItem atPath: aPath
Add the first argument at the node described by the second.
addAll: aCollection
Add the argument to the receiver.
addComponent: aVisualComponent
Add the argument to the receiver.
addWrapper: aVisualWrapper
Raise an error.
MetaClass: DisplayList class
examples
Create and answer a large display list with a lines, strings, and visuals.
gridExample
Create and answer a large display list with lines and strings.
gridExampleX: x byY: y
Create and answer a large display list with lines and strings.
polylineExample
Answer a display list with randomly-placed random-color polylines over the given extent.
polylineExampleHuge
Answer a display list with randomly-placed random-color polylines over the given (very large) extent.
polylinesX: x byY: y
Answer a display list with randomly-placed random-color polylines over the given extent.
polylinesX: x byY: y items: num
Answer a display list with randomly-placed random-color polylines over the given extent.
postScriptExample
Create and answer a large display list with a lines, strings, and visuals.
randomExample
Create and answer a large display list with a lines, strings, and visuals.
rectangleExample
Answer a display list with randomly-placed random-color rectangles over the given extent.
rectanglesX: x byY: y
Answer a display list with randomly-placed random-color rectangles over the given extent.
stringExample
Open a display list view with randomly-placed random-color strings over the given extent.
stringsX: x byY: y
Answer a display list with randomly-placed random-color strings over the given extent.
visualsX: x byY: y
Answer a display list with randomly-placed random-color visuals over the given extent.