User Tools

Site Tools


caching:ex1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
caching:ex1 [2007/02/26 18:24] bdefraincaching:ex1 [2021/02/05 13:51] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Caching: Constant Override ======+[[caching:intro|Intro]] 
 +[[caching:ex1|Ex1]] 
 +[[caching:ex2|Ex2]] 
 +[[caching:ex3|Ex3]] 
 +[[caching:ex4|Ex4]]====== Caching: Constant Override ======
  
 **Task:** Pass ''tests.BoundsConstant''. **Task:** Pass ''tests.BoundsConstant''.
  
-The ''getBounds()'' method of a ''Group'' could be understood to be a conservative approximation of the bounding box of a groupIf that is true, then it would be legal (and much fasterimplementation of ''getBounds()'' to simply always return rectangle consisting of the entire canvas. The entire canvas is returned by the static member ''FigureElement.MAX_BOUNDS''. Write an aspect to implement this change.+A first, very crude approximation of the bounding box, would be to return the entire drawing canvasThis is certainly very fast to calculate (it is constant value), although it might mean excessive redrawing. 
 + 
 +Implement an aspect to return the entire canves when the ''getBounds()'' method of ''Group'' is invoked. The entire canvas can be retrieved through the static field ''MAX_BOUNDS'' of ''FigureElement''.
  
 <note tip> <note tip>
caching/ex1.1172510666.txt.gz · Last modified: 2007/02/26 18:24 by bdefrain