简体   繁体   English

wxBitmap 中不推荐使用的方法?

[英]Deprecated methods in wxBitmap?

When using wxWidgets 3.1 I get the following deprecation warnings with wxBitmap:使用 wxWidgets 3.1 时,我收到以下关于 wxBitmap 的弃用警告:

'wxGDIImage::SetWidth': was declared deprecated
'wxGDIImage::SetHeight': was declared deprecated

As I can't find a suitable hint at the related position in sourcecode: what is the replacement for this?由于我在源代码中的相关 position 中找不到合适的提示:这个的替代品是什么? How shall one set width and height of a bitmap now?现在bitmap的宽度和高度应该怎么设置?

dimensions and depth can only be set at construction time , and the commit . 尺寸和深度只能在构建时设置,并且提交 AFAIU using those functions never changed the bitmap structure, so using them will only be misleading.使用这些函数的 AFAIU 从未改变 bitmap 结构,因此使用它们只会产生误导。

If you want to go further and not even allow deprecated functions, you can build your libs and app with WXWIN_COMPATIBILITY_3_0 set to 0 .如果您想进一步 go 甚至不允许弃用的功能,您可以构建您的库和应用程序并将WXWIN_COMPATIBILITY_3_0设置为0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM