绘制越界时,SurfaceInkCanvas会缩放笔划(SurfaceInkCanvas scales strokes when painting out of bounds)

编程入门 行业动态 更新时间:2024-10-23 10:32:12
绘制越界时,SurfaceInkCanvas会缩放笔划(SurfaceInkCanvas scales strokes when painting out of bounds)

我有一个ScatterView ,其中包含我应该能够绘制的图像。

<s:ScatterView HorizontalAlignment="Center" Margin="0,0,0,0" Name="desk" VerticalAlignment="Center"> <s:ScatterViewItem Width="200" Height="200"> <Grid> <Image Name="img1" Source="/Resources/Desert.jpg"/> <Viewbox> <s:SurfaceInkCanvas Name="cvs1"/> </Viewbox> </Grid> </s:ScatterViewItem> </s:ScatterView>

我注意到,每当我向图像的边框绘制墨迹时,墨水画布上的笔划都会缩小,以便为更多内容腾出空间。 我想要缩小这些笔画。 我该如何改变这种行为?

这是一个显示正在发生的事情的视频。

I have a ScatterView that contains an image over which I should be able to draw.

<s:ScatterView HorizontalAlignment="Center" Margin="0,0,0,0" Name="desk" VerticalAlignment="Center"> <s:ScatterViewItem Width="200" Height="200"> <Grid> <Image Name="img1" Source="/Resources/Desert.jpg"/> <Viewbox> <s:SurfaceInkCanvas Name="cvs1"/> </Viewbox> </Grid> </s:ScatterViewItem> </s:ScatterView>

I noticed that whenever I draw an ink trail towards the border of the image, the strokes on the ink canvas are scaled down to make room for more stuff. I do not want these strokes to be zoomed out. How can I change this behavior?

Here is a video that shows what's going on.

最满意答案

我想到了。 这种行为是由于我没有在SurfaceInkCanvas上定义Width和Height这一事实引起的。 这应该是诀窍:

<s:SurfaceInkCanvas Name="cvs1" Width="200" Height="200" />

I figured it out. This behavior is caused by the fact that I hadn't defined a Width and Height on the SurfaceInkCanvas. This should do the trick:

<s:SurfaceInkCanvas Name="cvs1" Width="200" Height="200" />

更多推荐

<s,Name,ScatterView,电脑培训,计算机培训,IT培训"/> <meta name="descri

本文发布于:2023-04-29 01:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1334555.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:缩放   笔划   SurfaceInkCanvas   scales   bounds

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!