Krosskritacore
moduleFunction: getBrush
This function returns a Brush
taken from the list of
Krita resources. It takes one argument: the name of the brush.
For example (in Ruby):
Krosskritacore::getBrush("Circle (05)")
Function: getFilter
This function returns a Filter
taken from the list of
Krita resources. It takes one argument: the name of the filter.
For example (in Ruby):
Krosskritacore::getFilter("invert")
Function: getPattern
This function returns a Pattern
taken from the list of
Krita resources. It takes one argument: the name of the pattern.
For example (in Ruby):
Krosskritacore::getPattern("Bricks")
Function: loadBrush
This function loads a Brush
and then returns it.
It takes one argument: the filename of the brush.
Function: loadPattern
This function loads a Pattern
and then returns it.
It takes one argument: the filename of the pattern.
Function: newCircleBrush
This function returns a Brush
with a circular shape. It
takes at least two arguments: width and height. It can take two other
arguments: width of the shading, and height of the shading. If the shading
is not specified, no shading will be used.
For example (in Ruby):
Krosskritacore::newCircleBrush(10,20) # create a plain circle Krosskritacore::newCircleBrush(10,20,5,10) # create a gradient
Function: newHSVColor
This function returns a new Color
with the given HSV
triplet. It takes three arguments: hue component (0 to 255), saturation
component (0 to 255), value component (0 to 255).
For example (in Ruby):
Krosskritacore::newRGBColor(255,125,0)
Function: newImage
This function returns a new Image
. It takes four arguments:
width, height, colorspace id, name of the image. And in return you get an
Image
object.
For example (in Ruby):
Krosskritacore::newImage(10,20, "RGBA", "kikoo")
Function: newRectBrush
This function returns a Brush
with a rectangular shape.
It takes at least two arguments: width and height. It can take two other
arguments: width of the shading and height of the shading. If the shading is
not specified, no shading will be used.
For example (in Ruby):
Krosskritacore::newRectBrush(10,20) # create a plain rectangle Krosskritacore::newRectBrush(10,20,5,10) # create a gradient
Function: newRGBColor
This function returns a new Color
with the given RGB
triplet. It takes three arguments: red component (0 to 255), blue component (0 to
255), green component (0 to 255).
For example (in Ruby):
Krosskritacore::newRGBColor(255,0,0) # create a red color Krosskritacore::newRGBColor(255,255,255) # create a white color
Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team