createCGRect function

CGRect createCGRect(
  1. double x,
  2. double y,
  3. double width,
  4. double height,
)

Helper to create CGRect.

Implementation

objc.CGRect createCGRect(double x, double y, double width, double height) {
  final ptr = calloc<objc.CGRect>();
  ptr.ref.origin.x = x;
  ptr.ref.origin.y = y;
  ptr.ref.size.width = width;
  ptr.ref.size.height = height;


  return ptr.ref;
}