FastUIDraw
Public Types | Public Member Functions | Static Public Member Functions | List of all members
fastuidraw::CustomFillRuleFunction Class Reference

Class to specify a custom fill rule from a function. More...

#include <fill_rule.hpp>

Inheritance diagram for fastuidraw::CustomFillRuleFunction:
Inheritance graph
[legend]

Public Types

typedef bool(* fill_rule_fcn) (int)
 

Public Member Functions

 CustomFillRuleFunction (fill_rule_fcn fill_rule)
 
 CustomFillRuleFunction (enum PainterEnums::fill_rule_t fill_rule)
 
virtual bool operator() (int winding_number) const
 

Static Public Member Functions

static fill_rule_fcn function_from_enum (enum PainterEnums::fill_rule_t fill_rule)
 

Detailed Description

Class to specify a custom fill rule from a function.

Definition at line 52 of file fill_rule.hpp.

Member Typedef Documentation

◆ fill_rule_fcn

typedef bool(* fastuidraw::CustomFillRuleFunction::fill_rule_fcn) (int)

Typedef to fill rule function pointer type

Definition at line 58 of file fill_rule.hpp.

Constructor & Destructor Documentation

◆ CustomFillRuleFunction() [1/2]

fastuidraw::CustomFillRuleFunction::CustomFillRuleFunction ( fill_rule_fcn  fill_rule)
inlineexplicit

Ctor.

Parameters
fill_rulefunction to use to implement operator(int) const.

Definition at line 66 of file fill_rule.hpp.

◆ CustomFillRuleFunction() [2/2]

fastuidraw::CustomFillRuleFunction::CustomFillRuleFunction ( enum PainterEnums::fill_rule_t  fill_rule)
inlineexplicit

Ctor from a PainterEnums::fill_rule_t enumeration

Parameters
fill_ruleenumeration for fill rule.

Definition at line 75 of file fill_rule.hpp.

Member Function Documentation

◆ function_from_enum()

static fill_rule_fcn fastuidraw::CustomFillRuleFunction::function_from_enum ( enum PainterEnums::fill_rule_t  fill_rule)
static

Returns a fill_rule_fcn implementing a fill rule from a PainterEnums::fill_rule_t.

Parameters
fill_ruleenumerated fill rule.

◆ operator()()

virtual bool fastuidraw::CustomFillRuleFunction::operator() ( int  winding_number) const
inlinevirtual

To be implemented by a derived class to return true if to draw those regions with the passed winding number.

Parameters
winding_numberwinding number value to test.

Implements fastuidraw::CustomFillRuleBase.

Definition at line 81 of file fill_rule.hpp.


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