@@ -1124,6 +1124,18 @@ impl From<QImage> for QPixmap {
1124
1124
}
1125
1125
}
1126
1126
1127
+ /// Bindings for [`Qt::PenCapStyle`][enum] enum.
1128
+ ///
1129
+ /// [enum]: https://doc.qt.io/qt-5/qt.html#PenCapStyle-enum
1130
+ #[ repr( C ) ]
1131
+ #[ derive( Clone , Copy , PartialEq , Debug ) ]
1132
+ #[ allow( non_camel_case_types) ]
1133
+ pub enum PenCapStyle {
1134
+ FlatCap = 0x00 ,
1135
+ SquareCap = 0x10 ,
1136
+ RoundCap = 0x20 ,
1137
+ }
1138
+
1127
1139
/// Bindings for [`Qt::PenStyle`][enum] enum.
1128
1140
///
1129
1141
/// [enum]: https://doc.qt.io/qt-5/qt.html#PenStyle-enum
@@ -1166,6 +1178,9 @@ impl QPen {
1166
1178
pub fn set_width_f ( & mut self , width : qreal ) {
1167
1179
cpp ! ( unsafe [ self as "QPen*" , width as "qreal" ] { return self ->setWidthF( width) ; } ) ;
1168
1180
}
1181
+ pub fn set_cap_style ( & mut self , style : PenCapStyle ) {
1182
+ cpp ! ( unsafe [ self as "QPen*" , style as "Qt::PenCapStyle" ] { return self ->setCapStyle( style) ; } ) ;
1183
+ }
1169
1184
1170
1185
// QBrush brush() const
1171
1186
// Qt::PenCapStyle capStyle() const
@@ -1177,7 +1192,6 @@ impl QPen {
1177
1192
// Qt::PenJoinStyle joinStyle() const
1178
1193
// qreal miterLimit() const
1179
1194
// void setBrush(const QBrush &brush)
1180
- // void setCapStyle(Qt::PenCapStyle style)
1181
1195
// void setCosmetic(bool cosmetic)
1182
1196
// void setDashOffset(qreal offset)
1183
1197
// void setDashPattern(const QVector<qreal> &pattern)
0 commit comments