CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::CPattern Class Reference

#include <cartotype_graphics_context.h>

Inheritance diagram for CartoType::CPattern:
CartoType::CPaintServer

Public Member Functions

 CPattern (std::shared_ptr< CBitmap > aBitmap, int32_t aXOffset, int32_t aYOffset)
 
TColor Color (int32_t aX, int32_t aY) override
 
std::shared_ptr< CBitmapTexture () override
 
std::shared_ptr< CPaintServerBlended (TColor) override
 
- Public Member Functions inherited from CartoType::CPaintServer
virtual TColor Color (int32_t aX, int32_t aY)=0
 
virtual std::shared_ptr< CBitmapTexture ()=0
 
virtual std::shared_ptr< CPaintServerBlended (TColor aBlendColor)=0
 
virtual const TColorRamp () const
 
virtual const THachureParamHachureParam () const
 

Additional Inherited Members

- Public Attributes inherited from CartoType::CPaintServer
CString iName
 

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

◆ CPattern()

CartoType::CPattern::CPattern ( std::shared_ptr< CBitmap 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< CPaintServer > CartoType::CPattern::Blended ( TColor  aBlendColor)
inlineoverridevirtual

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

Implements CartoType::CPaintServer.

◆ Color()

TColor CartoType::CPattern::Color ( int32_t  aX,
int32_t  aY 
)
overridevirtual

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

Implements CartoType::CPaintServer.

◆ Texture()

std::shared_ptr< CBitmap > CartoType::CPattern::Texture ( )
overridevirtual

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

Implements CartoType::CPaintServer.


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