Skip to content

Dev stage shadow#268

Merged
MagueresMathieu merged 11 commits intodevStagefrom
devStage_shadow
Apr 16, 2026
Merged

Dev stage shadow#268
MagueresMathieu merged 11 commits intodevStagefrom
devStage_shadow

Conversation

@MagueresMathieu
Copy link
Copy Markdown
Collaborator

update devStage

Copy link
Copy Markdown
Contributor

@LANDAISB LANDAISB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to create Unit Tests ! At least for all commands

^ property
]

{ #category : #'as yet unclassified' }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to choose a prototol name

]

{ #category : #'as yet unclassified' }
PyramidBackgroundBlocPlugin class >> gaussianShadowWidth [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a good name, prefix with shadow, maybe shadowWidthGaussian

inputValue: [ PyramidShadowCommand current lastGaussianShadow ];
inputValidation: [ :value | value class = BlGaussianShadowEffect ];
yourself);
yourself.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the last yourself (unused)

propertiesManager addProperty: self class borderRadialOuterRadius.

"Shadow"
PyramidShadowCommand resetShadowCommand.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why need reset ? Why use a singleton (current) ?

childToMoveCollection size = 1
ifFalse: [ ^ self ].
navigationSelectionPanel := navigationPlugin navigation
selectionPanel.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to carriage return here

BlSimpleShadowEffect color: Color black offset: 2 @ 2 ]
]

{ #category : #'as yet unclassified' }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need protocol name

aBlElement effect: anArgument
]

{ #category : #'as yet unclassified' }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need protocol name

current := nil
]

{ #category : #'as yet unclassified' }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need protocol name

{ #category : #'as yet unclassified' }
PyramidShadowCommand >> getValueFor: aBlElement [

^ aBlElement effect
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are several types of effects in BlElement : overlay, blur, shadow, etc. How do you handle a BlElement with another effect ?

aBlElement effect class = BlSimpleShadowEffect ifTrue: [
lastSimpleShadow := aBlElement effect ].
aBlElement effect class = BlGaussianShadowEffect ifTrue: [
lastGaussianShadow := aBlElement effect ]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same problem here: different kind of effects

PyramidShadowOffsetCommand >> getValueFor: aBlElement [

^ aBlElement effect offset
^ (aBlElement effect isKindOf: BlShadowEffect) ifTrue: [aBlElement effect offset] ifFalse: [ ^ self ]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why return self fo other effects ? Maybe better to return nil or 0@0 ?

PyramidShadowColorCommand >> getValueFor: aBlElement [
^ aBlElement effect color

(aBlElement effect isKindOf: BlShadowEffect)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Global on several methods: better to use guard clause => (a = b) ifTrue:[^self].

^ PyramidShadowColorCommand new
]

{ #category : #'as yet unclassified' }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need protocol name: (fix it on TPyramidCommandTest)

@MagueresMathieu MagueresMathieu merged commit 297e672 into devStage Apr 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants