Skip to content
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

Using Transform2DEffect with BackdropBrush #294

Closed
nesherhh opened this issue Jun 26, 2018 · 2 comments
Closed

Using Transform2DEffect with BackdropBrush #294

nesherhh opened this issue Jun 26, 2018 · 2 comments
Assignees

Comments

@nesherhh
Copy link

Issue Type

[ ] Bug Report
[ ] Feature Request
[x] Sample request
[ ] Documentation issue or request
[ ] Other – Please describe:

Current Behavior

System.ArgumentException
HResult=0x80070057
Message=Falscher Parameter.

Invalid argument to parameter value. Backdrop brushes cannot be transformed.
Source=Windows
StackTrace:
at Windows.UI.Composition.CompositionEffectBrush.SetSourceParameter(String name, CompositionBrush source)
at OffsetEffectTest.OffsetBrush.OnConnected() in C:\temp\OffsetEffectTest\OffsetEffectTest\OffsetBrush.cs:line 37

Expected Behavior

I'm trying to make a brush that takes a BackdropBrush, makes offset in X coordinate and combines the result with the original BackdropBrush. So it like same image doubled and shifted on X.
But I get the Exception that Transform2DEffect (win2d) can't be used with BackdropBrush. How do I make transformation to the BackdropBrush?

Your Environment

  • SDK #: 17134
  • Operating System build # : 17134.112
  • Visual Studio Version # : 15.7.4
@krenner
Copy link
Member

krenner commented Jul 13, 2018

@nesherhh Sorry I didn't answer this sooner. We have a very specific solution we use for optimizing BackdropBrush and could not guarantee good results with transforms so we unfortunately prevent that case. Do you have a sketch or comp of what you want these effects to look like? There could be another option using something like blend modes and opacity if you don’t require effects drawn on contents underneath a visual.

@krenner
Copy link
Member

krenner commented Mar 6, 2019

Closing due to inactivity, please re-open if needed.

@krenner krenner closed this as completed Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants