带有分隔符图案的纹理画笔
需要一个方法来返回变量Texturebrush。该方法需要重载:
Size AreaSize,
int HorizontalSeperatorCount,
int VerticalSeperatorCount,
int SeperatorWidth,
Brush Seperatorbackground,
Brush Rectanglebackground,
矩形的大小将自动计算
这些示例具有以下值
Size AreaSize = new Size(100, 100),
int HorizontalSeperatorCount = 1,
int VerticalSeperatorCount = 1,
int SeperatorWidth = 10,
Brush Seperatorbackground = Brushes.Grey,
Brush Rectanglebackground = Brushes.Red
第二个示例具有不同的 VerticalSeperatorCount
Size AreaSize = new Size(100, 100),
int HorizontalSeperatorCount = 1,
int VerticalSeperatorCount = 3,
int SeperatorWidth = 10,
Brush Seperatorbackground = Brushes.Grey,
Brush Rectanglebackground = Brushes.Red
方法的签名,
public static TextureBrush GetTextureBrush(Size areaSize, int horizontalSeperator, int verticalSeperatorCount, int seperatorWidth, Brush seperatorBackground, Brush rectangleBackground)
Texturebrush 将是用于填充窗口
我不擅长绘图。 我会非常非常高兴有一个解决方案。
need a Method to return a variable Texturebrush. The method need to be overloaded with:
Size AreaSize,
int HorizontalSeperatorCount,
int VerticalSeperatorCount,
int SeperatorWidth,
Brush Seperatorbackground,
Brush Rectanglebackground,
The size of the rectangle will be calculated automatically
These example have following values
Size AreaSize = new Size(100, 100),
int HorizontalSeperatorCount = 1,
int VerticalSeperatorCount = 1,
int SeperatorWidth = 10,
Brush Seperatorbackground = Brushes.Grey,
Brush Rectanglebackground = Brushes.Red
The second example have a different VerticalSeperatorCount
Size AreaSize = new Size(100, 100),
int HorizontalSeperatorCount = 1,
int VerticalSeperatorCount = 3,
int SeperatorWidth = 10,
Brush Seperatorbackground = Brushes.Grey,
Brush Rectanglebackground = Brushes.Red
The signatur of the method
public static TextureBrush GetTextureBrush(Size areaSize, int horizontalSeperator, int verticalSeperatorCount, int seperatorWidth, Brush seperatorBackground, Brush rectangleBackground)
The Texturebrush will be used to fill a window
I'm not the best at the drawing stuff.
I would be very very happy about a solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于四舍五入,过多的分隔符会带来一些麻烦。对我来说没问题。
Make some trouble with to much seperators because of the rounding . It's ok for me.