@@ -541,20 +541,34 @@ public enum FDWaveformType: Equatable {
541541public struct FDWaveformRenderFormat {
542542
543543 /// The type of waveform to render
544- public var type : FDWaveformType = . linear
544+ public var type : FDWaveformType
545545
546546 /// The color of the waveform
547- public var wavesColor = UIColor . black
547+ public var wavesColor : UIColor
548548
549549 /// The scale factor to apply to the rendered image (usually the current screen's scale)
550- public var scale : CGFloat = UIScreen . main . scale
550+ public var scale : CGFloat
551551
552552 /// Whether the resulting image size should be as close as possible to imageSize (approximate)
553553 /// or whether it should match it exactly. Right now there is no support for matching exactly.
554554 // TODO: Support rendering operations that always match the desired imageSize passed in.
555555 // Right now the imageSize passed in to the render operation might not match the
556556 // resulting image's size. This flag is hard coded here to convey that.
557557 public let constrainImageSizeToExactlyMatch = false
558+
559+ // To make these public, you must implement them
560+ // See http://stackoverflow.com/questions/26224693/how-can-i-make-public-by-default-the-member-wise-initialiser-for-structs-in-swif
561+ public init ( ) {
562+ self . init ( type: . linear,
563+ wavesColor: . black,
564+ scale: UIScreen . main. scale)
565+ }
566+
567+ public init ( type: FDWaveformType , wavesColor: UIColor , scale: CGFloat ) {
568+ self . type = type
569+ self . wavesColor = wavesColor
570+ self . scale = scale
571+ }
558572}
559573
560574/// Operation used for rendering waveform images
0 commit comments