CartoType C++ API 8.8-7-gb35e4dc71
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoTypeCore::Pattern Class Reference

#include <cartotype_graphics_context.h>

Inheritance diagram for CartoTypeCore::Pattern:
CartoTypeCore::PaintServer

Public Member Functions

 Pattern (std::shared_ptr< Bitmap > aBitmap, int32_t aXOffset, int32_t aYOffset)
 
CartoTypeCore::Color Color (int32_t aX, int32_t aY) override
 
const BitmapTexture () override
 
std::shared_ptr< PaintServerBlended (CartoTypeCore::Color) override
 
- Public Member Functions inherited from CartoTypeCore::PaintServer
virtual CartoTypeCore::Color Color (int32_t aX, int32_t aY)=0
 
virtual const BitmapTexture ()=0
 
virtual std::shared_ptr< PaintServerBlended (CartoTypeCore::Color aBlendColor)=0
 
virtual const CartoTypeCore::ColorRamp () const
 
virtual const CartoTypeCore::HachureParamHachureParam () const
 

Additional Inherited Members

- Public Attributes inherited from CartoTypeCore::PaintServer
String Name
 

Detailed Description

A paint server that draws a bitmap as a repeating pattern of rectangular tiles. Successive rows or columns can optionally be offset to give a less square appearance.

Constructor & Destructor Documentation

◆ Pattern()

CartoTypeCore::Pattern::Pattern ( std::shared_ptr< Bitmap aBitmap,
int32_t  aXOffset,
int32_t  aYOffset 
)
inline

Creates a pattern referring to a certain bitmap. Does not take ownership of the bitmap.

Member Function Documentation

◆ Blended()

std::shared_ptr< PaintServer > CartoTypeCore::Pattern::Blended ( CartoTypeCore::Color  aBlendColor)
inlineoverridevirtual

Creates a new paint server with colors converted to night mode or other color effect by blending with the specified color.

Implements CartoTypeCore::PaintServer.

◆ Color()

Color CartoTypeCore::Pattern::Color ( int32_t  aX,
int32_t  aY 
)
overridevirtual

Supplies a color for the pixel at (aX,aY) in premultiplied RGBA format.

Implements CartoTypeCore::PaintServer.

◆ Texture()

const Bitmap * CartoTypeCore::Pattern::Texture ( )
overridevirtual

Returns the texture: a bitmap which is the smallest possible repeating element. Returns null if that is not possible.

Implements CartoTypeCore::PaintServer.


The documentation for this class was generated from the following files: