summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-06-05 15:52:05 +0200
committerGitHub <noreply@github.com>2017-06-05 15:52:05 +0200
commitf8d7670e82007103573b88f48fe7b7c4addbd66d (patch)
treef4802061ca26ae9220ec9a5e9d51d80e1a465faa /servers/visual
parent075c7d8133e4fde353ab54a255638b0c9a3740a5 (diff)
parenta3c90b029308eb46b7fd83a0cf7b502ecbd79d55 (diff)
Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/rasterizer.h8
-rw-r--r--servers/visual/visual_server_canvas.cpp6
-rw-r--r--servers/visual/visual_server_viewport.cpp2
3 files changed, 8 insertions, 8 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 4b274acd9e..723c5737cd 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -769,7 +769,7 @@ public:
case Item::Command::TYPE_LINE: {
const Item::CommandLine *line = static_cast<const Item::CommandLine *>(c);
- r.pos = line->from;
+ r.position = line->from;
r.expand_to(line->to);
} break;
case Item::Command::TYPE_RECT: {
@@ -786,7 +786,7 @@ public:
case Item::Command::TYPE_PRIMITIVE: {
const Item::CommandPrimitive *primitive = static_cast<const Item::CommandPrimitive *>(c);
- r.pos = primitive->points[0];
+ r.position = primitive->points[0];
for (int i = 1; i < primitive->points.size(); i++) {
r.expand_to(primitive->points[i]);
@@ -797,7 +797,7 @@ public:
const Item::CommandPolygon *polygon = static_cast<const Item::CommandPolygon *>(c);
int l = polygon->points.size();
const Point2 *pp = &polygon->points[0];
- r.pos = pp[0];
+ r.position = pp[0];
for (int i = 1; i < l; i++) {
r.expand_to(pp[i]);
@@ -822,7 +822,7 @@ public:
case Item::Command::TYPE_CIRCLE: {
const Item::CommandCircle *circle = static_cast<const Item::CommandCircle *>(c);
- r.pos = Point2(-circle->radius, -circle->radius) + circle->pos;
+ r.position = Point2(-circle->radius, -circle->radius) + circle->pos;
r.size = Point2(circle->radius * 2.0, circle->radius * 2.0);
} break;
case Item::Command::TYPE_TRANSFORM: {
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp
index 3a83ba887d..b4a133e68a 100644
--- a/servers/visual/visual_server_canvas.cpp
+++ b/servers/visual/visual_server_canvas.cpp
@@ -61,7 +61,7 @@ void VisualServerCanvas::_render_canvas_item(Item *p_canvas_item, const Transfor
Rect2 rect = ci->get_rect();
Transform2D xform = p_transform * ci->xform;
Rect2 global_rect = xform.xform(rect);
- global_rect.pos += p_clip_rect.pos;
+ global_rect.position += p_clip_rect.position;
if (ci->use_parent_material && p_material_owner)
ci->material_owner = p_material_owner;
@@ -119,7 +119,7 @@ void VisualServerCanvas::_render_canvas_item(Item *p_canvas_item, const Transfor
ci->final_transform = xform;
ci->final_modulate = Color(modulate.r * ci->self_modulate.r, modulate.g * ci->self_modulate.g, modulate.b * ci->self_modulate.b, modulate.a * ci->self_modulate.a);
ci->global_rect_cache = global_rect;
- ci->global_rect_cache.pos -= p_clip_rect.pos;
+ ci->global_rect_cache.position -= p_clip_rect.position;
ci->light_masked = false;
int zidx = p_z - VS::CANVAS_ITEM_Z_MIN;
@@ -1041,7 +1041,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occlud
PoolVector<Vector2>::Read r = p_shape.read();
for (int i = 0; i < lc; i++) {
if (i == 0)
- occluder_poly->aabb.pos = r[i];
+ occluder_poly->aabb.position = r[i];
else
occluder_poly->aabb.expand_to(r[i]);
}
diff --git a/servers/visual/visual_server_viewport.cpp b/servers/visual/visual_server_viewport.cpp
index 63ed0ac7c4..c1f1922255 100644
--- a/servers/visual/visual_server_viewport.cpp
+++ b/servers/visual/visual_server_viewport.cpp
@@ -133,7 +133,7 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport) {
cl->texture_cache = NULL;
Transform2D scale;
scale.scale(cl->rect_cache.size);
- scale.elements[2] = cl->rect_cache.pos;
+ scale.elements[2] = cl->rect_cache.position;
cl->light_shader_xform = (cl->xform_cache * scale).affine_inverse();
cl->light_shader_pos = cl->xform_cache[2];
if (cl->shadow_buffer.is_valid()) {