gpt4 book ai didi

wpf - 如何获取 PathFigureCollection 边界矩形

转载 作者:行者123 更新时间:2023-12-01 09:59:54 25 4
gpt4 key购买 nike

是否可以在 C# 中找到 PathFigureCollection 对象的边界矩形?(我知道如何使用 FrameworkElement 获取它,但这不是我想要的)

最佳答案

尝试将您的 PathFigureCollection 包含在 PathGeometry 对象中,然后您可以通过 Bounds 属性访问边界矩形。

例子

var geometry = new PathGeometry {
Figures = new PathFigureCollection()
};
var boundingRect = geometry.Bounds;

关于wpf - 如何获取 PathFigureCollection 边界矩形,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17858985/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com