30 return area->v2->vec.y -
area->v1->vec.y + 1;
34 return area->v4->vec.x -
area->v1->vec.x + 1;
73 const rcti *bounds_rect,
83 if ((se->v1->vec.y > bounds_rect->
ymin) && (se->v1->vec.y < (bounds_rect->
ymax - 1))) {
85 min =
MIN2(se->v1->vec.x, se->v2->vec.x);
86 max =
MAX2(se->v1->vec.x, se->v2->vec.x);
88 if (
abs(my - se->v1->vec.y) <= safety && mx >=
min && mx <=
max) {
94 if ((se->v1->vec.x > bounds_rect->
xmin) && (se->v1->vec.x < (bounds_rect->
xmax - 1))) {
96 min =
MIN2(se->v1->vec.y, se->v2->vec.y);
97 max =
MAX2(se->v1->vec.y, se->v2->vec.y);
99 if (
abs(mx - se->v1->vec.x) <= safety && my >=
min && my <=
max) {
139 const rcti *screen_rect)
144 bool needs_another_pass =
false;
147 float min[2] = {20000.0f, 20000.0f};
148 float max[2] = {0.0f, 0.0f};
151 const float fv[2] = {(
float)sv->vec.x, (
float)sv->vec.y};
155 int screen_size_x_prev = (
max[0] -
min[0]) + 1;
156 int screen_size_y_prev = (
max[1] -
min[1]) + 1;
158 if (screen_size_x_prev != screen_size_x || screen_size_y_prev != screen_size_y) {
159 const float facx = ((
float)screen_size_x - 1) / ((
float)screen_size_x_prev - 1);
160 const float facy = ((
float)screen_size_y - 1) / ((
float)screen_size_y_prev - 1);
183 const int yval =
area->v1->vec.y + headery - 1;
194 needs_another_pass =
true;
209 const int yval =
area->v2->vec.y - headery + 1;
220 needs_another_pass =
true;
230 return needs_another_pass;
235 rcti window_rect, screen_rect;
239 bool needs_another_pass;
240 int max_passes_left = 10;
244 }
while (needs_another_pass && (max_passes_left > 0));
255 if (
area->v1->vec.y > window_rect.
ymin) {
258 if (
area->v2->vec.y < (window_rect.
ymax - 1)) {
264 area->v3->vec.x =
area->v4->vec.x = window_rect.
xmax - 1;
267 area->v2->vec.y =
area->v3->vec.y = window_rect.
ymax - 1;
269 switch (
area->global->align) {
281 const rcti *window_rect,
292 if (cur_area_width <= 2 * area_min_x) {
297 if (cur_area_height <= 2 * area_min_y) {
303 CLAMP(fac, 0.0f, 1.0f);
308 int area_min = area_min_y;
310 if (
area->v1->vec.y > window_rect->
ymin) {
311 area_min +=
U.pixelsize;
313 if (
area->v2->vec.y < (window_rect->
ymax - 1)) {
314 area_min +=
U.pixelsize;
317 if (
y -
area->v1->vec.y < area_min) {
318 y =
area->v1->vec.y + area_min;
320 else if (
area->v2->vec.y -
y < area_min) {
321 y =
area->v2->vec.y - area_min;
329 int area_min = area_min_x;
331 if (
area->v1->vec.x > window_rect->
xmin) {
332 area_min +=
U.pixelsize;
334 if (
area->v4->vec.x < (window_rect->
xmax - 1)) {
335 area_min +=
U.pixelsize;
338 if (
x -
area->v1->vec.x < area_min) {
339 x =
area->v1->vec.x + area_min;
341 else if (
area->v4->vec.x -
x < area_min) {
342 x =
area->v4->vec.x - area_min;
354 if (edge->v1->vec.x == edge->v2->vec.x) {
370 bool oneselected =
true;
371 while (oneselected) {
374 if (se->v1->flag + se->v2->flag == 1) {
376 if (se->v1->vec.y == se->v2->vec.y) {
377 se->v1->flag = se->v2->flag = 1;
382 if (se->v1->vec.x == se->v2->vec.x) {
383 se->v1->flag = se->v2->flag = 1;
typedef float(TangentPoint)[2]
struct ScrEdge * BKE_screen_find_edge(const struct bScreen *screen, struct ScrVert *v1, struct ScrVert *v2)
void BKE_screen_sort_scrvert(struct ScrVert **v1, struct ScrVert **v2)
#define LISTBASE_FOREACH(type, var, list)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE short round_fl_to_short(float a)
void minmax_v2v2_v2(float min[2], float max[2], const float vec[2])
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
#define AREAMAP_FROM_SCREEN(screen)
@ GLOBAL_AREA_ALIGN_BOTTOM
@ USER_APP_LOCK_EDGE_RESIZE
int ED_area_global_size_y(const ScrArea *area)
#define ED_screen_verts_iter(win, screen, vert_name)
int ED_area_headersize(void)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
ATTR_WARN_UNUSED_RESULT const BMVert * v2
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
ScrEdge * screen_geom_area_map_find_active_scredge(const ScrAreaMap *area_map, const rcti *bounds_rect, const int mx, const int my)
void screen_geom_select_connected_edge(const wmWindow *win, ScrEdge *edge)
bool screen_geom_edge_is_horizontal(ScrEdge *se)
ScrEdge * screen_geom_find_active_scredge(const wmWindow *win, const bScreen *screen, const int mx, const int my)
static bool screen_geom_vertices_scale_pass(const wmWindow *win, const bScreen *screen, const rcti *screen_rect)
ScrEdge * screen_geom_edge_add(bScreen *screen, ScrVert *v1, ScrVert *v2)
ScrVert * screen_geom_vertex_add(bScreen *screen, short x, short y)
int screen_geom_area_width(const ScrArea *area)
ScrEdge * screen_geom_edge_add_ex(ScrAreaMap *area_map, ScrVert *v1, ScrVert *v2)
int screen_geom_area_height(const ScrArea *area)
ScrVert * screen_geom_vertex_add_ex(ScrAreaMap *area_map, short x, short y)
void screen_geom_vertices_scale(const wmWindow *win, bScreen *screen)
Main screen-layout calculation function.
short screen_geom_find_area_split_point(const ScrArea *area, const rcti *window_rect, const eScreenAxis dir_axis, float fac)
bScreen * WM_window_get_active_screen(const wmWindow *win)
void WM_window_rect_calc(const wmWindow *win, rcti *r_rect)
void WM_window_screen_rect_calc(const wmWindow *win, rcti *r_rect)