Skip to content

Commit

Permalink
Add missing baseline correction
Browse files Browse the repository at this point in the history
Extracted from the booklet; I missed it before.
  • Loading branch information
tinchodias committed Feb 25, 2021
1 parent 6522661 commit ae6a570
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Bloc-Memory/MGCardElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,15 @@ MGCardElement >> drawFlippedSideOn: aCanvas [
named: 'Source Sans Pro';
size: 50;
build.

textPainter := aCanvas text
font: font;
paint: Color white;
string: self card symbol asString.

metrics := textPainter measure.
origin := self extent - metrics textMetrics bounds extent / 2.0.
origin := (self extent - metrics textMetrics bounds extent) / 2.0.
origin := origin - metrics textMetrics bounds origin.
textPainter
baseline: origin;
draw
Expand Down

0 comments on commit ae6a570

Please sign in to comment.