Exemple #1
0
 def color(self, c):
     self._call_cfunc(
         'vital_feature_{}_set_color'.format(self._tchar),
         [self.C_TYPE_PTR, RGBColor.c_ptr_type()],
         None,
         self, c
     )
Exemple #2
0
 def color(self):
     cptr = self._call_cfunc(
         "vital_feature_color",
         [self.C_TYPE_PTR],
         [self],
         RGBColor.c_ptr_type(),
     )
     return RGBColor(from_cptr=cptr)
Exemple #3
0
 def color(self):
     cptr = self._call_cfunc(
         "vital_feature_color",
         [self.C_TYPE_PTR],
         RGBColor.c_ptr_type(),
         self
     )
     return RGBColor(from_cptr=cptr)
Exemple #4
0
 def color(self, c):
     if self._datatype is None:
         raise VitalNoTypeInfoException("Type info required but not present")
     self._call_cfunc(
         'vital_feature_{}_set_color'.format(self._tchar),
         [self.C_TYPE_PTR, RGBColor.c_ptr_type()],
         [self, c],
     )
Exemple #5
0
 def color(self, c):
     if self._datatype is None:
         raise VitalNoTypeInfoException(
             "Type info required but not present")
     self._call_cfunc(
         'vital_feature_{}_set_color'.format(self._tchar),
         [self.C_TYPE_PTR, RGBColor.c_ptr_type()],
         [self, c],
     )
Exemple #6
0
    def _new(self, loc, mag, scale, angle, rgb_color):
        loc = EigenArray.from_iterable(loc,
                                       target_ctype=self._datatype,
                                       target_shape=(2, 1))
        if rgb_color is None:
            rgb_color = RGBColor()

        # noinspection PyProtectedMember
        return self._call_cfunc('vital_feature_{}_new'.format(self._tchar), [
            EigenArray.c_ptr_type(2, 1, self._datatype), self._datatype,
            self._datatype, self._datatype,
            RGBColor.c_ptr_type()
        ], [loc, mag, scale, angle, rgb_color], self.C_TYPE_PTR)
Exemple #7
0
    def _new(self, loc, mag, scale, angle, rgb_color):
        loc = EigenArray.from_iterable(loc, target_ctype=self._datatype,
                                       target_shape=(2, 1))
        if rgb_color is None:
            rgb_color = RGBColor()

        # noinspection PyProtectedMember
        return self._call_cfunc(
            'vital_feature_{}_new'.format(self._tchar),
            [
                EigenArray.c_ptr_type(2, 1, self._datatype),
                self._datatype, self._datatype, self._datatype,
                RGBColor.c_ptr_type()
            ],
            self.C_TYPE_PTR,
            loc, mag, scale, angle, rgb_color
        )
Exemple #8
0
 def color(self, c):
     self._call_cfunc(
         'vital_feature_{}_set_color'.format(self._tchar),
         [self.C_TYPE_PTR, RGBColor.c_ptr_type()],
         [self, c],
     )
Exemple #9
0
 def color(self):
     cptr = self._call_cfunc('vital_landmark_color', [self.C_TYPE_PTR],
                             [self], RGBColor.c_ptr_type())
     return RGBColor(from_cptr=cptr)
Exemple #10
0
 def color(self, c):
     self._call_cfunc(
         'vital_landmark_{}_set_color'.format(self._tchar),
         [self.C_TYPE_PTR, RGBColor.c_ptr_type()], [self, c],
         exception_map={1: VitalDynamicCastException})