Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
skia.SkTArray_SynthProvider Class Reference

Public Member Functions

def __init__ (self, valobj, dict)
 
def num_children (self)
 
def get_child_index (self, name)
 
def get_child_at_index (self, index)
 
def update (self)
 
def has_children (self)
 

Public Attributes

 valobj
 
 fData
 
 fSize
 
 dataType
 
 dataSize
 

Detailed Description

Definition at line 41 of file skia.py.

Constructor & Destructor Documentation

◆ __init__()

def skia.SkTArray_SynthProvider.__init__ (   self,
  valobj,
  dict 
)

Definition at line 43 of file skia.py.

43 def __init__(self, valobj, dict):
44 self.valobj = valobj
45

Member Function Documentation

◆ get_child_at_index()

def skia.SkTArray_SynthProvider.get_child_at_index (   self,
  index 
)

Definition at line 61 of file skia.py.

61 def get_child_at_index(self, index):
62 if index < 0:
63 return None
64 if index >= self.num_children():
65 return None
66
67 try:
68 offset = index * self.dataSize
69 return self.fData.CreateChildAtOffset('[' + str(index) + ']', offset, self.dataType)
70 except:
71 return None
72

◆ get_child_index()

def skia.SkTArray_SynthProvider.get_child_index (   self,
  name 
)

Definition at line 55 of file skia.py.

55 def get_child_index(self, name):
56 try:
57 return int(name.lstrip('[').rstrip(']'))
58 except:
59 return -1
60

◆ has_children()

def skia.SkTArray_SynthProvider.has_children (   self)

Definition at line 82 of file skia.py.

82 def has_children(self):
83 return True
84
85

◆ num_children()

def skia.SkTArray_SynthProvider.num_children (   self)

Definition at line 46 of file skia.py.

46 def num_children(self):
47 try:
48 size = self.fSize.GetValueAsSigned(0)
49 size = max(size, 0)
50 size = min(size, 10000)
51 return size
52 except:
53 return 0
54
static float max(float r, float g, float b)
Definition: hsl.cpp:49
static float min(float r, float g, float b)
Definition: hsl.cpp:48

◆ update()

def skia.SkTArray_SynthProvider.update (   self)

Definition at line 73 of file skia.py.

73 def update(self):
74 try:
75 self.fData = self.valobj.GetChildMemberWithName('fData')
76 self.fSize = self.valobj.GetChildMemberWithName('fSize')
77 self.dataType = self.fData.GetType().GetPointeeType()
78 self.dataSize = self.dataType.GetByteSize()
79 except:
80 pass
81
static Dart_TypedData_Type GetType(intptr_t class_id)
Definition: update.py:1

Member Data Documentation

◆ dataSize

skia.SkTArray_SynthProvider.dataSize

Definition at line 78 of file skia.py.

◆ dataType

skia.SkTArray_SynthProvider.dataType

Definition at line 77 of file skia.py.

◆ fData

skia.SkTArray_SynthProvider.fData

Definition at line 75 of file skia.py.

◆ fSize

skia.SkTArray_SynthProvider.fSize

Definition at line 76 of file skia.py.

◆ valobj

skia.SkTArray_SynthProvider.valobj

Definition at line 44 of file skia.py.


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