parent
58a181ccbc
commit
14d62d0029
12
src/output.c
12
src/output.c
|
@ -42,14 +42,14 @@ void output_transform_coord(const struct output* self,
|
|||
break;
|
||||
case WL_OUTPUT_TRANSFORM_90:
|
||||
*dst_x = src_y;
|
||||
*dst_y = self->width - src_x;
|
||||
*dst_y = self->height - src_x;
|
||||
break;
|
||||
case WL_OUTPUT_TRANSFORM_180:
|
||||
*dst_x = self->width - src_x;
|
||||
*dst_y = self->height - src_y;
|
||||
break;
|
||||
case WL_OUTPUT_TRANSFORM_270:
|
||||
*dst_x = self->height - src_y;
|
||||
*dst_x = self->width - src_y;
|
||||
*dst_y = src_x;
|
||||
break;
|
||||
case WL_OUTPUT_TRANSFORM_FLIPPED:
|
||||
|
@ -57,16 +57,16 @@ void output_transform_coord(const struct output* self,
|
|||
*dst_y = src_y;
|
||||
break;
|
||||
case WL_OUTPUT_TRANSFORM_FLIPPED_90:
|
||||
*dst_x = self->height - src_y;
|
||||
*dst_y = self->width - src_x;
|
||||
*dst_x = src_y;
|
||||
*dst_y = src_x;
|
||||
break;
|
||||
case WL_OUTPUT_TRANSFORM_FLIPPED_180:
|
||||
*dst_x = src_x;
|
||||
*dst_y = self->height - src_y;
|
||||
break;
|
||||
case WL_OUTPUT_TRANSFORM_FLIPPED_270:
|
||||
*dst_x = src_y;
|
||||
*dst_y = src_x;
|
||||
*dst_x = self->width - src_y;
|
||||
*dst_y = self->height - src_x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
16
src/render.c
16
src/render.c
|
@ -73,32 +73,32 @@ static const float transforms[][4] = {
|
|||
0.0f, 1.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_90] = {
|
||||
0.0f, -1.0f,
|
||||
1.0f, 0.0f,
|
||||
0.0f, 1.0f,
|
||||
-1.0f, 0.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_180] = {
|
||||
-1.0f, 0.0f,
|
||||
0.0f, -1.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_270] = {
|
||||
0.0f, 1.0f,
|
||||
-1.0f, 0.0f,
|
||||
0.0f, -1.0f,
|
||||
1.0f, 0.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_FLIPPED] = {
|
||||
-1.0f, 0.0f,
|
||||
0.0f, 1.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_FLIPPED_90] = {
|
||||
0.0f, -1.0f,
|
||||
-1.0f, 0.0f,
|
||||
0.0f, 1.0f,
|
||||
1.0f, 0.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_FLIPPED_180] = {
|
||||
1.0f, 0.0f,
|
||||
0.0f, -1.0f,
|
||||
},
|
||||
[WL_OUTPUT_TRANSFORM_FLIPPED_270] = {
|
||||
0.0f, 1.0f,
|
||||
1.0f, 0.0f,
|
||||
0.0f, -1.0f,
|
||||
-1.0f, 0.0f,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue