Class: Xberg::ImageOutputFormatSvg

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
ImageOutputFormat
Defined in:
lib/xberg/native.rb

Overview

Output pure-vector SVG. Lossless. Raster sources are not re-encoded (a warning is emitted and the image bytes are left untouched).

When the source is already SVG, the bytes are passed through the usvg sanitizer (strips external hrefs, JS event handlers, and foreignObject elements) when [SvgOptions::sanitize] is true.

Requires the svg feature.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_hash(hash) ⇒ Object



260
261
262
# File 'lib/xberg/native.rb', line 260

def self.from_hash(hash)
  new
end

Instance Method Details

#heif?Boolean

Returns:

  • (Boolean)


254
# File 'lib/xberg/native.rb', line 254

def heif? = false

#jpeg?Boolean

Returns:

  • (Boolean)


250
# File 'lib/xberg/native.rb', line 250

def jpeg? = false

#native?Boolean

Returns:

  • (Boolean)


246
# File 'lib/xberg/native.rb', line 246

def native? = false

#png?Boolean

Returns:

  • (Boolean)


248
# File 'lib/xberg/native.rb', line 248

def png? = false

#svg?Boolean

Returns:

  • (Boolean)


256
257
258
# File 'lib/xberg/native.rb', line 256

def svg? = true
# @param hash [Hash] deserialized from the native extension
# @return [self]

#webp?Boolean

Returns:

  • (Boolean)


252
# File 'lib/xberg/native.rb', line 252

def webp? = false