-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The type Graphic2D is a specialization of type Graphic that adds methods for interrogating the size of, and resizing, the object. This is not apparent from the names.
Worse, there is no type that represents a Graphic with a size. Class
drawable2DAt (location': Point)
size (dimension': Point)
on (canvas': DrawingCanvas)
claimed that it generated a Graphic2D, when it actually generates a
Graphic & interface {
width -> Number
height -> Number
size -> Point
}
When the compiler started generating a check for the return types, it failed. Commit f0e8b71 corrects the code.
However, errors like this are easy to make with such non-mnemonic names. I suggest either that all Graphics have a size, or, if this is infeasible, that we use three types Graphic, SizableGraphic, and ResizableGraphic. Add the 2D suffix to all of them if you like.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels