The Trunk: Graphics-pre.437.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-pre.437.mcz

commits-2
Patrick Rein uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-pre.437.mcz

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

Name: Graphics-pre.437
Author: pre
Time: 24 August 2020, 2:59:59.323786 pm
UUID: 62f7d108-a88e-1e49-b109-11a9cc14b292
Ancestors: Graphics-kfr.436

Recategorizes a number of methods throughout the package to make categories more consistent.

=============== Diff against Graphics-kfr.436 ===============

Item was changed:
+ ----- Method: AbstractFont>>isRegular (in category 'testing') -----
- ----- Method: AbstractFont>>isRegular (in category 'accessing') -----
  isRegular
  ^false!

Item was changed:
+ ----- Method: Color>>= (in category 'comparing') -----
- ----- Method: Color>>= (in category 'equality') -----
  = aColor
  "Return true if the receiver equals the given color. This method handles TranslucentColors, too."
 
  aColor isColor ifFalse: [^ false].
  ^ aColor privateRGB = rgb and:
  [aColor privateAlpha = self privateAlpha]
  !

Item was changed:
+ ----- Method: Color>>diff: (in category 'comparing') -----
- ----- Method: Color>>diff: (in category 'equality') -----
  diff: theOther
  "Returns a number between 0.0 and 1.0"
 
  ^ ((self privateRed - theOther privateRed) abs
  + (self privateGreen - theOther privateGreen) abs
  + (self privateBlue - theOther privateBlue) abs)
  / 3.0 / ComponentMax!

Item was changed:
+ ----- Method: Color>>hash (in category 'comparing') -----
- ----- Method: Color>>hash (in category 'equality') -----
  hash
 
  ^ rgb!

Item was changed:
+ ----- Method: Color>>isBitmapFill (in category 'testing') -----
- ----- Method: Color>>isBitmapFill (in category 'queries') -----
  isBitmapFill
  ^false!

Item was changed:
+ ----- Method: Color>>isBlack (in category 'testing') -----
- ----- Method: Color>>isBlack (in category 'queries') -----
  isBlack
  "Return true if the receiver represents black"
  ^rgb = 0!

Item was changed:
+ ----- Method: Color>>isColor (in category 'testing') -----
- ----- Method: Color>>isColor (in category 'queries') -----
  isColor
 
  ^ true
  !

Item was changed:
+ ----- Method: Color>>isGradientFill (in category 'testing') -----
- ----- Method: Color>>isGradientFill (in category 'queries') -----
  isGradientFill
  ^false!

Item was changed:
+ ----- Method: Color>>isGray (in category 'testing') -----
- ----- Method: Color>>isGray (in category 'queries') -----
  isGray
  "Return true if the receiver represents a shade of gray"
  ^(self privateRed = self privateGreen) and:[self privateRed = self privateBlue]!

Item was changed:
+ ----- Method: Color>>isOpaque (in category 'testing') -----
- ----- Method: Color>>isOpaque (in category 'queries') -----
  isOpaque
  ^true!

Item was changed:
+ ----- Method: Color>>isOrientedFill (in category 'testing') -----
- ----- Method: Color>>isOrientedFill (in category 'queries') -----
  isOrientedFill
  "Return true if the receiver keeps an orientation (e.g., origin, direction, and normal)"
  ^false!

Item was changed:
+ ----- Method: Color>>isSolidFill (in category 'testing') -----
- ----- Method: Color>>isSolidFill (in category 'queries') -----
  isSolidFill
  ^true!

Item was changed:
+ ----- Method: Color>>isTranslucent (in category 'testing') -----
- ----- Method: Color>>isTranslucent (in category 'queries') -----
  isTranslucent
 
  ^ false
  !

Item was changed:
+ ----- Method: Color>>isTranslucentColor (in category 'testing') -----
- ----- Method: Color>>isTranslucentColor (in category 'queries') -----
  isTranslucentColor
  "This means: self isTranslucent, but isTransparent not"
  ^ false!

Item was changed:
+ ----- Method: Color>>isTransparent (in category 'testing') -----
- ----- Method: Color>>isTransparent (in category 'queries') -----
  isTransparent
 
  ^ false
  !

Item was changed:
+ ----- Method: DisplayObject>>isTransparent (in category 'testing') -----
- ----- Method: DisplayObject>>isTransparent (in category 'displaying-Display') -----
  isTransparent
  ^ false!

Item was changed:
+ ----- Method: FormSetFont>>makeTintable (in category 'tinting') -----
- ----- Method: FormSetFont>>makeTintable (in category 'as yet unclassified') -----
  makeTintable
  "Default."
 
  self tintable: true.
  self combinationRule: Form over.!

Item was changed:
+ ----- Method: FormSetFont>>preserveColors (in category 'tinting') -----
- ----- Method: FormSetFont>>preserveColors (in category 'as yet unclassified') -----
  preserveColors
 
  self tintable: false.
  self combinationRule: Form paint.!

Item was changed:
+ ----- Method: FormSetFont>>preserveColorsWithAlpha (in category 'tinting') -----
- ----- Method: FormSetFont>>preserveColorsWithAlpha (in category 'as yet unclassified') -----
  preserveColorsWithAlpha
  "Useful for rendering Emojis."
 
  self tintable: false.
  self combinationRule: Form blend.!

Item was changed:
+ ----- Method: InfiniteForm>>asColor (in category 'converting') -----
- ----- Method: InfiniteForm>>asColor (in category 'accessing') -----
  asColor
  ^ patternForm dominantColor!

Item was changed:
+ ----- Method: InfiniteForm>>asForm (in category 'converting') -----
- ----- Method: InfiniteForm>>asForm (in category 'accessing') -----
  asForm
  ^ patternForm!

Item was changed:
+ ----- Method: Point>>isIntegerPoint (in category 'testing') -----
- ----- Method: Point>>isIntegerPoint (in category 'truncation and round off') -----
  isIntegerPoint
  ^ x isInteger and: [ y isInteger ] !

Item was changed:
+ ----- Method: Point>>isPoint (in category 'testing') -----
- ----- Method: Point>>isPoint (in category 'converting') -----
  isPoint
  ^ true!

Item was changed:
+ ----- Method: Rectangle>>rightHalf (in category 'transforming') -----
- ----- Method: Rectangle>>rightHalf (in category 'truncation and round off') -----
  rightHalf
  ^self withLeft: self center x!

Item was changed:
+ ----- Method: TextStyle>>asStringOrText (in category 'converting') -----
- ----- Method: TextStyle>>asStringOrText (in category 'accessing') -----
  asStringOrText
  "be fancy"
  ^ self defaultFont familyName asText
  addAttribute: (TextFontReference toFont: self defaultFont);
  yourself!

Item was changed:
+ ----- Method: TextStyle>>printOn: (in category 'printing') -----
- ----- Method: TextStyle>>printOn: (in category 'accessing') -----
  printOn: aStream
 
  super printOn: aStream.
  self defaultFont printShortDescriptionOn: aStream
  !

Item was changed:
+ ----- Method: TextStyle>>storeDataOn: (in category 'object from disk') -----
- ----- Method: TextStyle>>storeDataOn: (in category 'Disk I/O') -----
  storeDataOn: aDataStream
  "The shared arrays in tabsArray and marginTabsArray are the globals DefaultTabsArray and DefaultMarginTabsArray.  DiskProxies will be substituted for these in (Array objectForDataStream:)."
 
  ^ super storeDataOn: aDataStream!

Item was changed:
+ ----- Method: TextStyle>>veryDeepCopyWith: (in category 'copying') -----
- ----- Method: TextStyle>>veryDeepCopyWith: (in category 'Disk I/O') -----
  veryDeepCopyWith: deepCopier
  "All inst vars are meant to be shared"
 
  self == #veryDeepCopyWith:. "to satisfy checkVariables"
  ^ deepCopier references at: self ifAbsentPut: [self shallowCopy]. "remember"!

Item was changed:
+ ----- Method: TranslucentColor>>hash (in category 'comparing') -----
- ----- Method: TranslucentColor>>hash (in category 'equality') -----
  hash
 
  ^ rgb bitXor: alpha
  !