7.1.4. AspectFrame

学习gtkmm有几周了,英语太烂了,硬着头皮边看边记,还没把握,发上来,大家斧正

7.1.4. AspectFrame

The AspectFrame widget looks like a Frame widget, but it also enforces the aspect ratio (the ratio of the width to the height) of the child widget, adding extra space if necessary. For instance, this would allow you to display a photograph without allowing the user to distort it horizontally or vertically while resizing.

AspectFrame(比例?外观框架)看起来像Frame控件,但它强制子控件的外观比例(长宽比例),必要时扩展显示空间。例如,显示一幅图片而缩放时不允许改变长宽比例。

参考

§  7.1.4.1. 示例

7.1.4.1. 示例

The following program uses a Gtk::AspectFrame to present a drawing area whose aspect ratio will always be 2:1, no matter how the user resizes the top-level window.

下例使用Gtk::AspectFrame显示一个不管顶层窗口如何改变长宽比总为2:1的空白绘图区。

7-4 AspectFrame

源代码

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值