The Inbox: Graphics-raa.383.mcz

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

The Inbox: Graphics-raa.383.mcz

commits-2
Bob Arning uploaded a new version of Graphics to project The Inbox:
http://source.squeak.org/inbox/Graphics-raa.383.mcz

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

Name: Graphics-raa.383
Author: raa
Time: 8 October 2017, 8:42:24.504722 am
UUID: 032db0c7-96b0-436f-b882-5ddbeeb9de99
Ancestors: Graphics-topa.382

try to ensure BitBlt>>primDisplayString:from:to:map:xTable:kern: uses the primitive since the fallback code can produce different results (StrikeFont + subPixelRendering turned off + maybe other stuff, e.g.)

=============== Diff against Graphics-topa.382 ===============

Item was changed:
  ----- Method: BitBlt>>primDisplayString:from:to:map:xTable:kern: (in category 'private') -----
  primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta
  | ascii |
  <primitive:'primitiveDisplayString' module:'BitBltPlugin'>
+
+ ((sourceForm isForm) and: [sourceForm unhibernate])
+ ifTrue: [^ self primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta].
+ ((destForm isForm) and: [destForm unhibernate])
+ ifTrue: [^ self primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta].
+ ((halftoneForm isForm) and: [halftoneForm unhibernate])
+ ifTrue: [^ self primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta].
+
  startIndex to: stopIndex do:[:charIndex|
  ascii := (aString at: charIndex) asciiValue.
  glyphMap ifNotNil:[ascii := glyphMap at: ascii+1].
  sourceX := xTable at: ascii + 1.
  width := (xTable at: ascii + 2) - sourceX.
  self copyBits.
  destX := destX + width + kernDelta.
  ].!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Graphics-raa.383.mcz

David T. Lewis
Moved to trunk. See "Graphical oddities across image save (squeak 5.1)" thread for background.

Dave

On Sun, Oct 08, 2017 at 12:42:36PM +0000, [hidden email] wrote:

> Bob Arning uploaded a new version of Graphics to project The Inbox:
> http://source.squeak.org/inbox/Graphics-raa.383.mcz
>
> ==================== Summary ====================
>
> Name: Graphics-raa.383
> Author: raa
> Time: 8 October 2017, 8:42:24.504722 am
> UUID: 032db0c7-96b0-436f-b882-5ddbeeb9de99
> Ancestors: Graphics-topa.382
>
> try to ensure BitBlt>>primDisplayString:from:to:map:xTable:kern: uses the primitive since the fallback code can produce different results (StrikeFont + subPixelRendering turned off + maybe other stuff, e.g.)
>
> =============== Diff against Graphics-topa.382 ===============
>
> Item was changed:
>   ----- Method: BitBlt>>primDisplayString:from:to:map:xTable:kern: (in category 'private') -----
>   primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta
>   | ascii |
>   <primitive:'primitiveDisplayString' module:'BitBltPlugin'>
> +
> + ((sourceForm isForm) and: [sourceForm unhibernate])
> + ifTrue: [^ self primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta].
> + ((destForm isForm) and: [destForm unhibernate])
> + ifTrue: [^ self primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta].
> + ((halftoneForm isForm) and: [halftoneForm unhibernate])
> + ifTrue: [^ self primDisplayString: aString from: startIndex to: stopIndex map: glyphMap xTable: xTable kern: kernDelta].
> +
>   startIndex to: stopIndex do:[:charIndex|
>   ascii := (aString at: charIndex) asciiValue.
>   glyphMap ifNotNil:[ascii := glyphMap at: ascii+1].
>   sourceX := xTable at: ascii + 1.
>   width := (xTable at: ascii + 2) - sourceX.
>   self copyBits.
>   destX := destX + width + kernDelta.
>   ].!
>
>