-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1565 from pharo-spec/dev-3.0
merge latest
- Loading branch information
Showing
65 changed files
with
3,060 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 20 additions & 15 deletions
35
src/Spec2-Adapters-Morphic-Alexandrie/SpAlexandrieMorph.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,48 @@ | ||
Class { | ||
#name : #SpAlexandrieMorph, | ||
#superclass : #Morph, | ||
#name : 'SpAlexandrieMorph', | ||
#superclass : 'Morph', | ||
#instVars : [ | ||
'surface', | ||
'drawBlock', | ||
'lastExtent' | ||
], | ||
#category : #'Spec2-Adapters-Morphic-Alexandrie-Base' | ||
#category : 'Spec2-Adapters-Morphic-Alexandrie-Base', | ||
#package : 'Spec2-Adapters-Morphic-Alexandrie', | ||
#tag : 'Base' | ||
} | ||
|
||
{ #category : #accessing } | ||
{ #category : 'accessing' } | ||
SpAlexandrieMorph >> drawBlock: aBlock [ | ||
|
||
drawBlock := aBlock | ||
] | ||
|
||
{ #category : #drawing } | ||
{ #category : 'drawing' } | ||
SpAlexandrieMorph >> drawOn: aMorphicCanvas [ | ||
|
||
self redraw. | ||
self surface | ||
displayOnMorphicCanvas: aMorphicCanvas | ||
at: bounds origin | ||
aMorphicCanvas | ||
image: self surface asForm | ||
at: self position | ||
sourceRect: (0@0 extent: self extent) | ||
rule: 34 | ||
] | ||
|
||
{ #category : #drawing } | ||
{ #category : 'drawing' } | ||
SpAlexandrieMorph >> redraw [ | ||
| context | | ||
|
||
self surface drawDuring: [ :canvas | | ||
drawBlock | ||
cull: canvas | ||
cull: (0@0 extent: self extent) ] | ||
context := self surface newContext. | ||
drawBlock | ||
cull: context | ||
cull: (0@0 extent: self extent) | ||
] | ||
|
||
{ #category : #accessing } | ||
{ #category : 'accessing' } | ||
SpAlexandrieMorph >> surface [ | ||
|
||
lastExtent = self extent ifFalse: [ surface := nil ]. | ||
^ surface ifNil: [ | ||
lastExtent := self extent. | ||
surface := AthensCairoSurface extent: self extent ] | ||
surface := AeCairoImageSurface extent: self extent ] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
Package { #name : #'Spec2-Adapters-Morphic-Alexandrie' } | ||
Package { #name : 'Spec2-Adapters-Morphic-Alexandrie' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.