在 wxwidgets 中创建正方形和矩形
我正在开发一个应用程序,其中一部分是让用户创建正方形或矩形等形状。我想知道 wxwidgets 中是否有一个函数可以让用户执行此操作。我想要做的是用户单击此按钮,然后他/她可以按照他/她所需的尺寸绘制正方形或矩形。就像在油漆中一样,您可以按照自己想要的尺寸制作自己的尺寸。这在 wxwidgets 和代码块中可能吗?也许一些相关的链接或教程或任何有帮助的东西。谢谢 !!
I'm working on an application, and part of it is making the user create a shapes such as squares or rectangles. I'm wondering if there is a function in wxwidgets that enable the user to do that. What i want to do is the user will click this button then he/she can draw a square or rectangle in his/her desired size. It is like in paint where you can make your own size in your desired size. Is that possible in wxwidgets and codeblocks? maybe some related links or tutorials or anything that will help. thanks !!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你应该使用这个 contrib 库:
这是链接:
http://docs.wxwidgets.org/2.8/wx_utilities.html
最大
You should use this contrib library:
This is the link:
http://docs.wxwidgets.org/2.8/wx_utilities.html
Max
标题说这里的上下文是“绘画”,好吧。
但是,如果您正在谈论用户创建的矩形作为选择内容的方式(或者用户在搜索该上下文时最终到达这里),则行话是矩形,因为选择是“选取框选择”,您将查看 Wx::覆盖来实现这一点。
Titles sais context here is "drawing", ok.
But in case you are talking about user-created rectangles as means of selecting stuff (or users end up here while searching for that context), jargon for that is rectangles as selection is "marquee selection", and you would look into Wx::Overlay to accomplish that.