You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened a discussion (here) a while back regarding some odd scaling that I was seeing when creating a "blurred" background affect on Android. I've since tracked the issue down to the SurfaceFactory.DrawSurface method. The approach to create the blurred view is the create a new canvas and manually draw a target view to it. This approach is nothing novel. When doing this, however, I have noticed though is that the native canvas passed to the DrawChild method of a SKCanvasViewRenderer, is NOT the size of immediate view but the size of the view on which the original draw request was made. Instead, the canvas has a clip region and translation applied to it. I have been able to work around this by creating my own SKCanvasViewRenderer.
In the base class's SurfaceFactory.DrawSurface method, the destination rect is set from (0, 0) on the canvas to the height and width of the canvas. I think that this needs to be changed to draw to the hight and width of the clipping region.
I would gladly implement this fix myself and post a PR; however, I have had a heck of a time getting the repo to build on my workstation.
Basic Information
Version with issue: At least 2.88.0 - I have not tested further back than that.
Last known good version: N/A
IDE: Visual Studio / Visual Studio for Mac / Rider
Platform Target Frameworks:
Android:
Target Devices:
Any Android Device
The text was updated successfully, but these errors were encountered:
I opened a discussion (here) a while back regarding some odd scaling that I was seeing when creating a "blurred" background affect on Android. I've since tracked the issue down to the
SurfaceFactory.DrawSurface
method. The approach to create the blurred view is the create a new canvas and manually draw a target view to it. This approach is nothing novel. When doing this, however, I have noticed though is that the native canvas passed to theDrawChild
method of aSKCanvasViewRenderer
, is NOT the size of immediate view but the size of the view on which the original draw request was made. Instead, the canvas has a clip region and translation applied to it. I have been able to work around this by creating my ownSKCanvasViewRenderer
.In the base class's
SurfaceFactory.DrawSurface
method, the destination rect is set from (0, 0) on the canvas to the height and width of the canvas. I think that this needs to be changed to draw to the hight and width of the clipping region.I would gladly implement this fix myself and post a PR; however, I have had a heck of a time getting the repo to build on my workstation.
Basic Information
The text was updated successfully, but these errors were encountered: