vector: rename AddPathStroke -> AddStroke

This commit is contained in:
Hajime Hoshi
2025-08-07 01:02:26 +09:00
parent f0b95f97bc
commit e4d514f2af
2 changed files with 6 additions and 6 deletions

View File

@@ -63,8 +63,8 @@ type StrokeOptions struct {
MiterLimit float32
}
// AddPathStrokeOptions is options for [Path.AddPathStroke].
type AddPathStrokeOptions struct {
// AddStrokeOptions is options for [Path.AddPathStroke].
type AddStrokeOptions struct {
// StrokeOptions is options for the stroke.
StrokeOptions
@@ -74,10 +74,10 @@ type AddPathStrokeOptions struct {
GeoM ebiten.GeoM
}
// AddPathStroke adds a stroke path to the path p.
// AddStroke adds a stroke path to the path p.
//
// The added stroke path must be rendered with FileRuleNonZero.
func (p *Path) AddPathStroke(src *Path, options *AddPathStrokeOptions) {
func (p *Path) AddStroke(src *Path, options *AddStrokeOptions) {
if options == nil {
return
}

View File

@@ -392,9 +392,9 @@ func FillPath(dst *ebiten.Image, path *Path, fillOptions *FillOptions, drawPathO
// StrokePath strokes the specified path with the specified options.
func StrokePath(dst *ebiten.Image, path *Path, strokeOptions *StrokeOptions, drawPathOptions *DrawPathOptions) {
var stroke Path
op := &AddPathStrokeOptions{}
op := &AddStrokeOptions{}
op.StrokeOptions = *strokeOptions
stroke.AddPathStroke(path, op)
stroke.AddStroke(path, op)
FillPath(dst, &stroke, nil, drawPathOptions)
}