Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SurfaceSynth Struct Reference

#include <cairo-templates.h>

Inherited by Inkscape::Filters::ConvolveMatrix< preserve_alpha >, Inkscape::Filters::DiffuseLight, and Inkscape::Filters::SpecularLight.

Public Member Functions

 SurfaceSynth (cairo_surface_t *surface)
 
guint32 pixelAt (int x, int y) const
 
guint32 alphaAt (int x, int y) const
 
guint32 pixelAt (double x, double y) const
 
guint32 alphaAt (double x, double y) const
 
NR::Fvector surfaceNormalAt (int x, int y, double scale) const
 

Public Attributes

unsigned char * _px
 
int _w
 
int _h
 
int _stride
 
bool _alpha
 

Detailed Description

Definition at line 224 of file cairo-templates.h.

Constructor & Destructor Documentation

◆ SurfaceSynth()

SurfaceSynth::SurfaceSynth ( cairo_surface_t surface)
inline

Definition at line 225 of file cairo-templates.h.

References surface.

Member Function Documentation

◆ alphaAt() [1/2]

guint32 SurfaceSynth::alphaAt ( double  x,
double  y 
) const
inline

Definition at line 293 of file cairo-templates.h.

References _alpha, _px, _stride, floor(), and result.

◆ alphaAt() [2/2]

guint32 SurfaceSynth::alphaAt ( int  x,
int  y 
) const
inline

Definition at line 244 of file cairo-templates.h.

References _alpha, _px, and _stride.

Referenced by pixelAt(), and surfaceNormalAt().

◆ pixelAt() [1/2]

guint32 SurfaceSynth::pixelAt ( double  x,
double  y 
) const
inline

Definition at line 256 of file cairo-templates.h.

References _alpha, _px, _stride, alphaAt(), floor(), result, and shift().

◆ pixelAt() [2/2]

guint32 SurfaceSynth::pixelAt ( int  x,
int  y 
) const
inline

Definition at line 235 of file cairo-templates.h.

References _alpha, _px, and _stride.

◆ surfaceNormalAt()

NR::Fvector SurfaceSynth::surfaceNormalAt ( int  x,
int  y,
double  scale 
) const
inline

Definition at line 318 of file cairo-templates.h.

References _h, _w, alphaAt(), NR::normalize_vector(), and scale.

Member Data Documentation

◆ _alpha

bool SurfaceSynth::_alpha

Definition at line 461 of file cairo-templates.h.

Referenced by alphaAt(), alphaAt(), pixelAt(), and pixelAt().

◆ _h

int SurfaceSynth::_h

Definition at line 460 of file cairo-templates.h.

Referenced by surfaceNormalAt().

◆ _px

unsigned char* SurfaceSynth::_px

Definition at line 459 of file cairo-templates.h.

Referenced by alphaAt(), alphaAt(), pixelAt(), and pixelAt().

◆ _stride

int SurfaceSynth::_stride

Definition at line 460 of file cairo-templates.h.

Referenced by alphaAt(), alphaAt(), pixelAt(), and pixelAt().

◆ _w

int SurfaceSynth::_w

Definition at line 460 of file cairo-templates.h.

Referenced by surfaceNormalAt().


The documentation for this struct was generated from the following file: