The Trunk: Graphics-tfel.355.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Graphics-tfel.355.mcz

commits-2
Tim Felgentreff uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-tfel.355.mcz

==================== Summary ====================

Name: Graphics-tfel.355
Author: tfel
Time: 27 July 2016, 6:02:58.629152 pm
UUID: 004f1a41-9be9-c443-9853-26c892c7a2ae
Ancestors: Graphics-tpr.354

small fix to allow creating Forms from hibernated bitmaps, like the Sugar icon library does

=============== Diff against Graphics-tpr.354 ===============

Item was changed:
  ----- Method: Form>>setExtent:depth:bits: (in category 'private') -----
  setExtent: extent depth: bitsPerPixel bits: bitmap
  "Create a virtual bit map with the given extent and bitsPerPixel."
 
  width := extent x asInteger.
  width < 0 ifTrue: [width := 0].
  height := extent y asInteger.
  height < 0 ifTrue: [height := 0].
  depth := bitsPerPixel.
  depth := bitsPerPixel.
+ (bits isNil
- (bitmap isNil
  or:[(bitmap class isWords and: [self bitsSize = bitmap size])
  or: [bitmap class isBytes and: [self bitsSize * 4 = bitmap size]]])
  ifFalse:[^self error:'Bad dimensions'].
  bits := bitmap!