次の方法で共有


AntiAliased Property

AntiAliased Property

Gets or sets the value that indicates whether a stroke is antialiased.

Declaration

[C++]

[propput] HRESULT put_AntiAliased ([in] VARIANT_BOOL AntiAliased);
[propget] HRESULT get_AntiAliased ([out, retval] VARIANT_BOOL*
    AntiAliased);

[Microsoft® Visual Basic® 6.0]

Public Property Get AntiAliased() As Boolean
Public Property Let AntiAliased(ByVal isAntiAliased As Boolean)

Property Value

VARIANT_BOOL The value that indicates whether a stroke is antialiased.

This property is read/write.

TRUE Default. The drawn ink is antialiased.
FALSE The drawn ink is not antialiased.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The AntiAliased parameter is an invalid pointer.
E_INK_EXCEPTION An exception occurred inside the method.
E_INVALIDARG The flag is invalid.

Remarks

If a stroke is antialiased, the foreground and background colors along the edge of the ink are blended to increase the visible smoothness.

Antialiasing improves the quality of rendering by making ink appear smoother and sharper, especially on lower resolution displays. However, antialiasing incurs added performance. Use it judiciously.

Example

[Visual Basic 6.0]

This Visual Basic 6.0 example shows an example using a checkbox to toggle antialiasing. Subsequent strokes are drawn with the AntiAliased property set or unset according to the setting of the CheckAntialias checkbox, which defaults to checked, since this property in InkCollector.DefaultDrawingAttributes defaults to TRUE. Existing strokes are unaffected by this setting.

Dim theInkCollector As InkCollector

Private Sub CheckAntialias_Click()
    theInkCollector.DefaultDrawingAttributes.AntiAliased = _
    Not theInkCollector.DefaultDrawingAttributes.AntiAliased
End Sub

Private Sub Form_Load()
    Set theInkCollector = New InkCollector
    theInkCollector.hWnd = Me.hWnd
    theInkCollector.Enabled = True
End Sub

Applies To