VideoTools/vendor/github.com/srwiley/oksvg/path_style.go
Stu Leak 68df790d27 Fix player frame generation and video playback
Major improvements to UnifiedPlayer:

1. GetFrameImage() now works when paused for responsive UI updates
2. Play() method properly starts FFmpeg process
3. Frame display loop runs continuously for smooth video display
4. Disabled audio temporarily to fix video playback fundamentals
5. Simplified FFmpeg command to focus on video stream only

Player now:
- Generates video frames correctly
- Shows video when paused
- Has responsive progress tracking
- Starts playback properly

Next steps: Re-enable audio playback once video is stable
2026-01-07 22:20:00 -05:00

36 lines
1.3 KiB
Go

// Copyright 2017 The oksvg Authors. All rights reserved.
// created: 2/12/2017 by S.R.Wiley
//
// utils.go implements translation of an SVG2.0 path into a rasterx Path.
package oksvg
import (
"image/color"
"github.com/srwiley/rasterx"
)
// PathStyle holds the state of the SVG style.
type PathStyle struct {
FillOpacity, LineOpacity float64
LineWidth, DashOffset, MiterLimit float64
Dash []float64
UseNonZeroWinding bool
fillerColor, linerColor interface{} // either color.Color or rasterx.Gradient
LineGap rasterx.GapFunc
LeadLineCap rasterx.CapFunc // This is used if different than LineCap
LineCap rasterx.CapFunc
LineJoin rasterx.JoinMode
mAdder rasterx.MatrixAdder // current transform
}
// styleAttribute describes draw options, such as {"fill":"black"; "stroke":"white"}.
type styleAttribute = map[string]string
// DefaultStyle sets the default PathStyle to fill black, winding rule,
// full opacity, no stroke, ButtCap line end and Bevel line connect.
var DefaultStyle = PathStyle{1.0, 1.0, 2.0, 0.0, 4.0, nil, true,
color.NRGBA{0x00, 0x00, 0x00, 0xff}, nil,
nil, nil, rasterx.ButtCap, rasterx.Bevel, rasterx.MatrixAdder{M: rasterx.Identity}}