ID2D1SvgGlyphStyle::SetStroke 方法 (d2d1_3.h)

為筆劃屬性提供 SVG 影像的值。 不透明度設定為 1 的筆刷會當做 'context-stroke' 使用。 筆刷的不透明度會當做 'context-stroke-opacity' 值使用。

語法

HRESULT SetStroke(
  [in, optional] ID2D1Brush  *brush,
                 FLOAT       strokeWidth,
  [in, optional] const FLOAT *dashes,
                 UINT32      dashesCount,
                 FLOAT       dashOffset
);

參數

[in, optional] brush

類型: ID2D1Brush*

描述如何繪製筆劃。 Null 筆刷會導致內容筆劃值無。

strokeWidth

類型: FLOAT

指定 『stroke-width』 屬性的 『context-value』。

[in, optional] dashes

類型: const FLOAT*

指定 『stroke-dasharray』 屬性的 'context-value'。 Null 值會導致 stroke-dasharray 設定為 'none'。

dashesCount

類型: UINT32

虛線陣列中的虛線數目。

dashOffset

類型: FLOAT

指定 『stroke-dashoffset』 屬性的 'context-value'。

傳回值

類型: HRESULT

這個方法會傳回 HRESULT 成功或錯誤碼。

規格需求

需求
目標平台 Windows
標頭 d2d1_3.h
Dll D2d1.dll

另請參閱

ID2D1SvgGlyphStyle