Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QPainterPathStroker Class Reference

The QPainterPathStroker class is used to generate fillable outlines for a given painter path. More...

Inheritance diagram for QtGui.QPainterPathStroker:
Collaboration diagram for QtGui.QPainterPathStroker:

Public Member Functions

 QPainterPathStroker ()
 
 
virtual void CreateProxy ()
 
new QPainterPath CreateStroke (QPainterPath path)
 
 
new void SetDashPattern (Qt.PenStyle arg1)
 
 
new void Dispose ()
 

Protected Member Functions

 QPainterPathStroker (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

new Qt.PenCapStyle CapStyle [get, set]
 
 
new double CurveThreshold [get, set]
 
 
new double DashOffset [get, set]
 
 
new
System.Collections.Generic.List
< System.Double > 
DashPattern [get, set]
 
 
new Qt.PenJoinStyle JoinStyle [get, set]
 
 
new double MiterLimit [get, set]
 
 
new double Width [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QPainterPathStroker class is used to generate fillable outlines for a given painter path.

By calling the createStroke() function, passing a given QPainterPath as argument, a new painter path representing the outline of the given path is created. The newly created painter path can then be filled to draw the original painter path's outline.

You can control the various design aspects (width, cap styles, join styles and dash pattern) of the outlining using the following functions:

setWidth()

setCapStyle()

setJoinStyle()

setDashPattern()

The setDashPattern() function accepts both a Qt::PenStyle object and a vector representation of the pattern as argument.

In addition you can specify a curve's threshold, controlling the granularity with which a curve is drawn, using the setCurveThreshold() function. The default threshold is a well adjusted value (0.25), and normally you should not need to modify it. However, you can make the curve's appearance smoother by decreasing its value.

You can also control the miter limit for the generated outline using the setMiterLimit() function. The miter limit describes how far from each join the miter join can extend. The limit is specified in the units of width so the pixelwise miter limit will be miterlimit * width. This value is only used if the join style is Qt::MiterJoin.

The painter path generated by the createStroke() function should only be used for outlining the given painter path. Otherwise it may cause unexpected behavior. Generated outlines also require the Qt::WindingFill rule which is set by default.

See also QPen and QBrush.

Constructor & Destructor Documentation

QtGui.QPainterPathStroker.QPainterPathStroker ( System.Type  dummy)
protected
QtGui.QPainterPathStroker.QPainterPathStroker ( )

Creates a new stroker.

Member Function Documentation

virtual void QtGui.QPainterPathStroker.CreateProxy ( )
virtual
new QPainterPath QtGui.QPainterPathStroker.CreateStroke ( QPainterPath  path)

Generates a new path that is a fillable area representing the outline of the given path.

The various design aspects of the outline are based on the stroker's properties: width(), capStyle(), joinStyle(), dashPattern(), curveThreshold() and miterLimit().

The generated path should only be used for outlining the given painter path. Otherwise it may cause unexpected behavior. Generated outlines also require the Qt::WindingFill rule which is set by default.

new void QtGui.QPainterPathStroker.Dispose ( )
new void QtGui.QPainterPathStroker.SetDashPattern ( Qt.PenStyle  arg1)

Sets the dash pattern for the generated outlines to style.

See also dashPattern().

Member Data Documentation

SmokeInvocation QtGui.QPainterPathStroker.interceptor
protected

Property Documentation

new Qt.PenCapStyle QtGui.QPainterPathStroker.CapStyle
getset

Returns the cap style of the generated outlines.

Sets the cap style of the generated outlines to style. If a dash pattern is set, each segment of the pattern is subject to the cap style.

new double QtGui.QPainterPathStroker.CurveThreshold
getset

Returns the curve flattening threshold for the generated outlines.

Specifies the curve flattening threshold, controlling the granularity with which the generated outlines' curve is drawn.

The default threshold is a well adjusted value (0.25), and normally you should not need to modify it. However, you can make the curve's appearance smoother by decreasing its value.

new double QtGui.QPainterPathStroker.DashOffset
getset

Returns the dash offset for the generated outlines.

Sets the dash offset for the generated outlines to offset.

See the documentation for QPen::setDashOffset() for a description of the dash offset.

new System.Collections.Generic.List<System.Double> QtGui.QPainterPathStroker.DashPattern
getset

Returns the dash pattern for the generated outlines.

Sets the dash pattern for the generated outlines to style.

new Qt.PenJoinStyle QtGui.QPainterPathStroker.JoinStyle
getset

Returns the join style of the generated outlines.

Sets the join style of the generated outlines to style.

new double QtGui.QPainterPathStroker.MiterLimit
getset

Returns the miter limit for the generated outlines.

Sets the miter limit of the generated outlines to limit.

The miter limit describes how far from each join the miter join can extend. The limit is specified in units of the currently set width. So the pixelwise miter limit will be miterlimit * width.

This value is only used if the join style is Qt::MiterJoin.

virtual System.IntPtr QtGui.QPainterPathStroker.SmokeObject
getset
new double QtGui.QPainterPathStroker.Width
getset

Returns the width of the generated outlines.

Sets the width of the generated outline painter path to width.

The generated outlines will extend approximately 50% of width to each side of the given input path's original outline.