Skip to content

Commit

Permalink
Merge pull request #609 from Enzo-Demeulenaere/dev
Browse files Browse the repository at this point in the history
Added some drag and drop example snippets
  • Loading branch information
tinchodias authored Nov 12, 2024
2 parents d316210 + f4372b2 commit 3486f9d
Show file tree
Hide file tree
Showing 15 changed files with 1,324 additions and 101 deletions.
7 changes: 2 additions & 5 deletions src/Bloc-Alexandrie/BlBorder.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ Extension { #name : #BlBorder }
BlBorder >> aeApplyTo: aeCanvas element: aBlElement [

"No need to set any parameter as there is no border"
self isTransparent ifTrue: [
^ aeCanvas setBorderOff ].
self isTransparent ifTrue: [ ^ aeCanvas setBorderOff ].

"This will double-dispatch with the geometry, and
may set an explicit border path for the outskirt."
Expand All @@ -25,9 +24,7 @@ BlBorder >> aeApplyTo: aeCanvas element: aBlElement [
offset: style dashOffset.

aBlElement geometry hasJoins ifTrue: [
style lineJoin
aeApplyTo: aeCanvas
style: style ].
style lineJoin aeApplyTo: aeCanvas style: style ].

(aBlElement geometry hasCaps or: [ style isDashed ]) ifTrue: [
style lineCap aeApplyTo: aeCanvas ].
Expand Down
4 changes: 1 addition & 3 deletions src/Bloc-Alexandrie/BlElement.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,10 @@ BlElement >> aeDrawOn: aeCanvas [

aeCanvas
restoreContextAfterPaintAlpha: self opacity
with: [
"My position is applied before my transformation matrix,
with: [ "My position is applied before my transformation matrix,
which may have an additional translation."
aeCanvas pathTranslate: self position.
self transformation aeApplyTo: aeCanvas.

self aeDrawIgnoringOpacityAndTransformationOn: aeCanvas ]
]

Expand Down
Loading

0 comments on commit 3486f9d

Please sign in to comment.