All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
brush_resource.hpp File Reference

KzuBrushResource is the base class for brushes used in layers. More...

Classes

class  kanzi::BrushResource
 

Namespaces

 kanzi
 

Typedefs

typedef shared_ptr< BrushResource > kanzi::BrushResourceSharedPtr
 

Functions

KANZI_API kzsError kzuBrushResourceCreate (kanzi::Domain *domain, kanzi::string_view name, kanzi::BrushResource **out_brushResource)
 Creates a brush resource that houses a brush. More...
 
KANZI_API
kanzi::BrushResourceSharedPtr 
kzuBrushResourceCreateFromBrush (kanzi::Domain *domain, kanzi::BrushSharedPtr brush)
 Creates a brush resource from given brush. More...
 
KANZI_API kzsError kzuBrushResourceLoadFromKZB (kanzi::BrushResource *brushResource, struct KzcInputStream *inputStream, const struct KzuBinaryFileInfo *file)
 Loads brush resource from KZB. More...
 
KANZI_API kanzi::BrushkzuBrushResourceGetBrush (const kanzi::BrushResource *brush)
 Access brush resource from brush. More...
 

Detailed Description

KzuBrushResource is the base class for brushes used in layers.

The objective is to provide a polymorphic resource used to fill areas.

Copyright 2008-2020 by Rightware. All rights reserved.

Function Documentation

KANZI_API kzsError kzuBrushResourceCreate ( kanzi::Domain domain,
kanzi::string_view  name,
kanzi::BrushResource **  out_brushResource 
)

Creates a brush resource that houses a brush.

Parameters
resourceManagerThe resource manager to use.
nameName of the new image texture.
loaderResource loader to use for loading the resource.
out_brushResourceA pointer that is set to point to the new brush resource.
KANZI_API kanzi::BrushResourceSharedPtr kzuBrushResourceCreateFromBrush ( kanzi::Domain domain,
kanzi::BrushSharedPtr  brush 
)

Creates a brush resource from given brush.

Parameters
resourceManagerThe resource manager to use.
brushBrush to use inside this brush resource.
Returns
Newly created brush resource.
KANZI_API kzsError kzuBrushResourceLoadFromKZB ( kanzi::BrushResource brushResource,
struct KzcInputStream inputStream,
const struct KzuBinaryFileInfo file 
)

Loads brush resource from KZB.

Parameters
brushResourceBrush resource.
inputStreamInput stream to load from.
fileFile information.
KANZI_API kanzi::Brush* kzuBrushResourceGetBrush ( const kanzi::BrushResource brush)

Access brush resource from brush.

Returns
Brush object.