[squeak-dev] The Trunk: System-mt.1327.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 21 12:39:54 UTC 2022


Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1327.mcz

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

Name: System-mt.1327
Author: mt
Time: 21 March 2022, 1:39:51.888314 pm
UUID: d5878d63-3c5a-485d-aceb-904aebf1a0ee
Ancestors: System-mt.1326

When calculating the pixel-scale factor (which is used in all pixel-based measures such as window extent or border width), avoid fractions and normalize 1.0 to 1. Makes arithmetics with "RealEstateAgent scaleFactor" faster.

=============== Diff against System-mt.1326 ===============

Item was changed:
  ----- Method: RealEstateAgent class>>scaleFactor (in category 'display scale') -----
  scaleFactor
  	"Use the default font height to calculate some factor. Note that, in a distant future, we will be able to use a method that is not based on pixels once we only use TrueType fonts all over the image and have a rendering system other than BitBlt. Then, TextStyle class >> #pixelsPerInch will suffice, considering that 96 PPI represents a scale factor of 1.0. Until then, rendering is based on pixel geometry."
  	
+ 	^ ScaleFactor ifNil: [
+ 		ScaleFactor := (TextStyle referenceHeight / StrikeFont referenceHeight) asFloat.
+ 		ScaleFactor = 1.0 ifTrue: [ScaleFactor := 1].
+ 		ScaleFactor]!
- 	^ ScaleFactor ifNil: [ScaleFactor := (TextStyle referenceHeight / StrikeFont referenceHeight)]!



More information about the Squeak-dev mailing list