Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
tonic::DartConverter< flutter::RRect > Struct Reference

#include <rrect.h>

Public Types

using NativeType = flutter::RRect
 
using FfiType = Dart_Handle
 

Static Public Member Functions

static NativeType FromDart (Dart_Handle handle)
 
static NativeType FromArguments (Dart_NativeArguments args, int index, Dart_Handle &exception)
 
static NativeType FromFfi (FfiType val)
 
static const char * GetFfiRepresentation ()
 
static const char * GetDartRepresentation ()
 
static bool AllowedInLeafCall ()
 

Static Public Attributes

static constexpr const char * kFfiRepresentation = "Handle"
 
static constexpr const char * kDartRepresentation = "Object"
 
static constexpr bool kAllowedInLeafCall = false
 

Detailed Description

Definition at line 25 of file rrect.h.

Member Typedef Documentation

◆ FfiType

Definition at line 27 of file rrect.h.

◆ NativeType

Definition at line 26 of file rrect.h.

Member Function Documentation

◆ AllowedInLeafCall()

static bool tonic::DartConverter< flutter::RRect >::AllowedInLeafCall ( )
inlinestatic

Definition at line 40 of file rrect.h.

40{ return kAllowedInLeafCall; }
static constexpr bool kAllowedInLeafCall
Definition rrect.h:30

◆ FromArguments()

RRect tonic::DartConverter< flutter::RRect >::FromArguments ( Dart_NativeArguments  args,
int  index,
Dart_Handle exception 
)
static

Definition at line 39 of file rrect.cc.

41 {
44 return FromDart(value);
45}
struct _Dart_Handle * Dart_Handle
Definition dart_api.h:258
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint8_t value
#define FML_DCHECK(condition)
Definition logging.h:103
bool CheckAndHandleError(Dart_Handle handle)
Definition dart_error.cc:33
static NativeType FromDart(Dart_Handle handle)
Definition rrect.cc:18

◆ FromDart()

RRect tonic::DartConverter< flutter::RRect >::FromDart ( Dart_Handle  handle)
static

Definition at line 18 of file rrect.cc.

18 {
19 Float32List buffer(value);
20
22 result.is_null = true;
23 if (buffer.data() == nullptr) {
24 return result;
25 }
26
27 SkVector radii[4] = {{buffer[4], buffer[5]},
28 {buffer[6], buffer[7]},
29 {buffer[8], buffer[9]},
30 {buffer[10], buffer[11]}};
31
32 result.sk_rrect.setRectRadii(
33 SkRect::MakeLTRB(buffer[0], buffer[1], buffer[2], buffer[3]), radii);
34
35 result.is_null = false;
36 return result;
37}
bool is_null
Definition rrect.h:17
static const uint8_t buffer[]
GAsyncResult * result
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)
Definition SkRect.h:646

◆ FromFfi()

static NativeType tonic::DartConverter< flutter::RRect >::FromFfi ( FfiType  val)
inlinestatic

Definition at line 37 of file rrect.h.

37{ return FromDart(val); }

◆ GetDartRepresentation()

static const char * tonic::DartConverter< flutter::RRect >::GetDartRepresentation ( )
inlinestatic

Definition at line 39 of file rrect.h.

39{ return kDartRepresentation; }
static constexpr const char * kDartRepresentation
Definition rrect.h:29

◆ GetFfiRepresentation()

static const char * tonic::DartConverter< flutter::RRect >::GetFfiRepresentation ( )
inlinestatic

Definition at line 38 of file rrect.h.

38{ return kFfiRepresentation; }
static constexpr const char * kFfiRepresentation
Definition rrect.h:28

Member Data Documentation

◆ kAllowedInLeafCall

constexpr bool tonic::DartConverter< flutter::RRect >::kAllowedInLeafCall = false
staticconstexpr

Definition at line 30 of file rrect.h.

◆ kDartRepresentation

constexpr const char* tonic::DartConverter< flutter::RRect >::kDartRepresentation = "Object"
staticconstexpr

Definition at line 29 of file rrect.h.

◆ kFfiRepresentation

constexpr const char* tonic::DartConverter< flutter::RRect >::kFfiRepresentation = "Handle"
staticconstexpr

Definition at line 28 of file rrect.h.


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