Merge pull request #60627 from aaronfranke/rename-elements
Rename Transform2D and Basis `elements` to `columns` and `rows` respectively
This commit is contained in:
commit
931838b330
59 changed files with 1081 additions and 1078 deletions
|
|
@ -1087,9 +1087,9 @@ void AnimationNodeStateMachineEditor::_connection_draw(const Vector2 &p_from, co
|
|||
Ref<Texture2D> icon = icons[p_mode + (p_auto_advance ? 3 : 0)];
|
||||
|
||||
Transform2D xf;
|
||||
xf.elements[0] = (p_to - p_from).normalized();
|
||||
xf.elements[1] = xf.elements[0].orthogonal();
|
||||
xf.elements[2] = (p_from + p_to) * 0.5 - xf.elements[1] * icon->get_height() * 0.5 - xf.elements[0] * icon->get_height() * 0.5;
|
||||
xf.columns[0] = (p_to - p_from).normalized();
|
||||
xf.columns[1] = xf.columns[0].orthogonal();
|
||||
xf.columns[2] = (p_from + p_to) * 0.5 - xf.columns[1] * icon->get_height() * 0.5 - xf.columns[0] * icon->get_height() * 0.5;
|
||||
|
||||
state_machine_draw->draw_set_transform_matrix(xf);
|
||||
if (p_multi_transitions) {
|
||||
|
|
|
|||
|
|
@ -3675,7 +3675,7 @@ void CanvasItemEditor::_draw_viewport() {
|
|||
// Update the transform
|
||||
transform = Transform2D();
|
||||
transform.scale_basis(Size2(zoom, zoom));
|
||||
transform.elements[2] = -view_offset * zoom;
|
||||
transform.columns[2] = -view_offset * zoom;
|
||||
EditorNode::get_singleton()->get_scene_root()->set_global_canvas_transform(transform);
|
||||
|
||||
// hide/show buttons depending on the selection
|
||||
|
|
|
|||
|
|
@ -455,7 +455,7 @@ void Polygon2DEditor::_uv_input(const Ref<InputEvent> &p_input) {
|
|||
}
|
||||
|
||||
Transform2D mtx;
|
||||
mtx.elements[2] = -uv_draw_ofs;
|
||||
mtx.columns[2] = -uv_draw_ofs;
|
||||
mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom));
|
||||
|
||||
Ref<InputEventMouseButton> mb = p_input;
|
||||
|
|
@ -970,7 +970,7 @@ void Polygon2DEditor::_uv_draw() {
|
|||
String warning;
|
||||
|
||||
Transform2D mtx;
|
||||
mtx.elements[2] = -uv_draw_ofs;
|
||||
mtx.columns[2] = -uv_draw_ofs;
|
||||
mtx.scale_basis(Vector2(uv_draw_zoom, uv_draw_zoom));
|
||||
|
||||
RS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(), mtx);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ void TextureRegionEditor::_region_draw() {
|
|||
}
|
||||
|
||||
Transform2D mtx;
|
||||
mtx.elements[2] = -draw_ofs * draw_zoom;
|
||||
mtx.columns[2] = -draw_ofs * draw_zoom;
|
||||
mtx.scale_basis(Vector2(draw_zoom, draw_zoom));
|
||||
|
||||
RS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), mtx);
|
||||
|
|
@ -267,7 +267,7 @@ void TextureRegionEditor::_region_input(const Ref<InputEvent> &p_input) {
|
|||
}
|
||||
|
||||
Transform2D mtx;
|
||||
mtx.elements[2] = -draw_ofs * draw_zoom;
|
||||
mtx.columns[2] = -draw_ofs * draw_zoom;
|
||||
mtx.scale_basis(Vector2(draw_zoom, draw_zoom));
|
||||
|
||||
const real_t handle_radius = 8 * EDSCALE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue