mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-09-26 20:11:28 +08:00
vector: rename AddPathStroke -> AddStroke
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user