SvgIconRasterizer
class SvgIconRasterizer implements FilterInterface (View source)
Generate bitmap icons starting from source SVG icons.
Properties
protected string | $coreVersion | The concrete5 version for which the bitmap icons should be created for. |
|
protected bool | $checkEditDate | Should the bitmap icons be created only if they don't exist, or if they are older than the source SVG files? |
|
protected OutputInterface | $output | ||
protected VolatileDirectory | $volatileDirectory | ||
protected Filesystem | $fs |
Methods
__construct(string $coreVersion, bool $checkEditDate, OutputInterface $output, VolatileDirectory $volatileDirectory, Filesystem $fs)
Initialize the instance.
array|null
bool
isBitmapNewerThanSVG(PackerFile $file, array $bitmapData)
Check if there's already a bitmap file, and that it's not older than the SVG file.
string
createBitmap(PackerFile $sourceFile, array $bitmapData)
Create the bitmap associated to an SVG file.
Details
__construct(string $coreVersion, bool $checkEditDate, OutputInterface $output, VolatileDirectory $volatileDirectory, Filesystem $fs)
Initialize the instance.
PackerFile[]
apply(PackerFile $file)
Process a file/directory.
protected array|null
getBitmapData(PackerFile $file)
Get the details of the bitmap data to be generated for a file.
protected bool
isBitmapNewerThanSVG(PackerFile $file, array $bitmapData)
Check if there's already a bitmap file, and that it's not older than the SVG file.
protected string
createBitmap(PackerFile $sourceFile, array $bitmapData)
Create the bitmap associated to an SVG file.