Nicolas Cellier uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-nice.550.mcz
==================== Summary ====================
Name: Graphics-nice.550 Author: nice Time: 7 February 2024, 11:08:47.366987 pm UUID: 9a845f0a-b60c-a740-93f9-d705b5b9b840 Ancestors: Graphics-mt.549
Provide a new Form hack of arbitrary width for bulk transfer of bytes.
This may be used for example for reversing the endianness of a DoubleWordArray.
=============== Diff against Graphics-mt.549 ===============
Item was added: + ----- Method: Form>>hackBits:width: (in category 'private') ----- + hackBits: bitThing width: anInteger + "This method provides an initialization so that BitBlt may be used, eg, to + copy ByteArrays and other non-pointer objects efficiently. + The resulting form looks anInteger wide, 8 bits deep, and height is adjusted to fit the bitThing size. + anInteger shall be a multiple of 4, because lines in a Form always fall on a Word boundary. + If not, some dead bytes will remain unaccessible to the BitBlt operations on each line. + That's also the case of trailing excess bytes" + width := anInteger. + depth := 8. + bitThing class isBits ifFalse: [self error: 'bitThing must be a non-pointer object']. + height := bitThing basicSize * bitThing bytesPerBasicElement // (width + 3 // 4 * 4). + bits := bitThing!
packages@lists.squeakfoundation.org