Class FileLayer
Build from FileLayer.h
Krita 4.0.0Krita 5.2.0

The FileLayer class A file layer is a layer that can reference an external image and show said reference in the layer stack.

If the external image is updated, Krita will try to update the file layer image as well.

Methods

path()str resetCache() scalingFilter()str scalingMethod()str setProperties(fileName: str, scalingMethod: str = "None", scalingFilter: str = "Bicubic") type()str

Member documentation

path()str
Krita 4.0.0

Return

A QString with the full path of the referenced image.

Krita 4.1.2

makes the file layer to reload the connected image from disk

scalingFilter()str
Krita 5.2.0

returns the filter with which the file referenced is scaled.

Return

(no description provided)

scalingMethod()str
Krita 4.0.0Krita 4.2.0

returns how the file referenced is scaled.

Return

one of the following:

  • None - The file is not scaled in any way.

  • ToImageSize - The file is scaled to the full image size;

  • ToImagePPI - The file is scaled by the PPI of the image. This keep the physical dimensions the same.

setProperties(fileName: str, scalingMethod: str = "None", scalingFilter: str = "Bicubic")
Krita 4.0.0Krita 5.2.0

Change the properties of the file layer.

Parameters

fileName

- A String containing the absolute file name.

scalingMethod

- a string with the scaling method, defaults to "None",

other options are "ToImageSize" and "ToImagePPI"

scalingFilter

- a string with the scaling filter, defaults to "Bicubic",

other options are "Hermite", "NearestNeighbor", "Bilinear", "Bell", "BSpline", "Lanczos3", "Mitchell"

type()str
Krita 4.0.0

Krita has several types of nodes, split in layers and masks. Group layers can contain other layers, any layer can contain masks.

Return

"filelayer"