-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix border and opacity lightshadow #10
base: master
Are you sure you want to change the base?
Conversation
Teria como adicionar imagens do antes/depois, para documentar a alteração? Obrigado pela contribuição! |
@@ -162,11 +164,13 @@ protected virtual void OnCanvasViewPaintSurface(object sender, SKPaintSurfaceEve | |||
if (drawOuterShadow) | |||
DrawOuterShadow(context); | |||
|
|||
SetPaintColor(context); | |||
//SetPaintColor(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Porque precisou remover a busca pelo paint color?
Eu criei essa parte para garantir que a cor de Background seria aplicada no controle, pois como o paint é passado por referencia, muitas vezes alteramos alguns parametros.
Um exemplo disso é a NeoProgressView
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vou refazer alguns testes, achei que ele estava redundante, reaplicando o efeito duas vezes
@@ -186,6 +190,8 @@ protected virtual void DrawInnerShadow(RenderContext context) | |||
{ | |||
var fShadowDistance = Convert.ToSingle(ShadowDistance); | |||
var darkShadow = Color.FromRgba(DarkShadowColor.R, DarkShadowColor.G, DarkShadowColor.B, Elevation); | |||
var lightShadow = Color.FromRgba(LightShadowColor.R, LightShadowColor.G, LightShadowColor.B, Elevation); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interessante, imaginei que o light Shadow precisaria ser sempre solido, pois no neomorfismo temos esse efeito de "continuidade" entre o fundo e o controle. Porém, faz sentido alterar a "força" dessa sombra com relação à elevação.
Seria interessante uma imagem para visualizar o efeito com alteração dessa opacidade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A verdade é que precisamos diferencia-la, porque caso o fundo seja estilo dark, precisamos de mais escuro e menos claro, e caso o fundo seja light, precisamos justamente do contrário, menos intensidade no preto, e mais intensidade no branco
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sim, mas para isso está aberta a possibilidade de alterar a cor, podendo utilizar um hexa decimal por exemplo.
O Elevation é a aplicação da opacidade em cima dessa cor ja definida, para dar ao programador uma ferramenta que possa utilizar nesse sentido. Criando efeitos de diferentes relevos ou animações.
Acredito que não seja o caso aplicado ao LightShadow
Co-authored-by: Felipe Baltazar <felipe.dasilvabaltazar@gmail.com>
Co-authored-by: Felipe Baltazar <felipe.dasilvabaltazar@gmail.com>
Overview
Issues Resolved
API Changes
None
Platforms Affected
Behavioral Changes
None
Testing Procedure
PR Checklist