Blender  V3.3
Functions
rect.h File Reference
#include "util/types.h"

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device_inline int4 rect_from_shape (int x0, int y0, int w, int h)
 
ccl_device_inline int4 rect_expand (int4 rect, int d)
 
ccl_device_inline int4 rect_clip (int4 a, int4 b)
 
ccl_device_inline bool rect_is_valid (int4 rect)
 
ccl_device_inline int coord_to_local_index (int4 rect, int x, int y)
 
ccl_device_inline bool local_index_to_coord (int4 rect, int idx, ccl_private int *x, ccl_private int *y)
 
ccl_device_inline int rect_size (int4 rect)
 

Function Documentation

◆ coord_to_local_index()

ccl_device_inline int coord_to_local_index ( int4  rect,
int  x,
int  y 
)

Definition at line 36 of file rect.h.

References w(), int4::x, x, int4::y, y, and int4::z.

◆ local_index_to_coord()

ccl_device_inline bool local_index_to_coord ( int4  rect,
int  idx,
ccl_private int *  x,
ccl_private int *  y 
)

Definition at line 44 of file rect.h.

References int4::w, w(), int4::x, x, int4::y, y, and int4::z.

◆ rect_clip()

ccl_device_inline int4 rect_clip ( int4  a,
int4  b 
)

Definition at line 25 of file rect.h.

References Freestyle::a, usdtokens::b(), make_int4, max, and min.

◆ rect_expand()

ccl_device_inline int4 rect_expand ( int4  rect,
int  d 
)

Definition at line 19 of file rect.h.

References make_int4, int4::w, int4::x, int4::y, and int4::z.

◆ rect_from_shape()

CCL_NAMESPACE_BEGIN ccl_device_inline int4 rect_from_shape ( int  x0,
int  y0,
int  w,
int  h 
)

Definition at line 14 of file rect.h.

References make_int4, and w().

◆ rect_is_valid()

ccl_device_inline bool rect_is_valid ( int4  rect)

Definition at line 30 of file rect.h.

References int4::w, int4::x, int4::y, and int4::z.

◆ rect_size()

ccl_device_inline int rect_size ( int4  rect)

Definition at line 55 of file rect.h.

References int4::w, int4::x, int4::y, and int4::z.

Referenced by BKE_icon_geom_rasterize(), GPU_viewport_bind(), scaledownx(), and scaledowny().