summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
Diffstat (limited to 'servers')
-rw-r--r--servers/visual/rasterizer.h3
-rw-r--r--servers/visual/visual_server_raster.cpp8
-rw-r--r--servers/visual/visual_server_raster.h1
-rw-r--r--servers/visual/visual_server_wrap_mt.h1
-rw-r--r--servers/visual_server.h1
5 files changed, 13 insertions, 1 deletions
diff --git a/servers/visual/rasterizer.h b/servers/visual/rasterizer.h
index 8c89ddd5b7..ebc210fe3d 100644
--- a/servers/visual/rasterizer.h
+++ b/servers/visual/rasterizer.h
@@ -783,6 +783,7 @@ public:
CanvasItem* final_clip_owner;
CanvasItem* material_owner;
ViewportRender *vp_render;
+ bool distance_field;
Rect2 global_rect_cache;
@@ -910,7 +911,7 @@ public:
}
void clear() { for (int i=0;i<commands.size();i++) memdelete( commands[i] ); commands.clear(); clip=false; rect_dirty=true; final_clip_owner=NULL; material_owner=NULL;}
- CanvasItem() { light_mask=1; vp_render=NULL; next=NULL; final_clip_owner=NULL; clip=false; final_opacity=1; blend_mode=VS::MATERIAL_BLEND_MODE_MIX; visible=true; rect_dirty=true; custom_rect=false; ontop=true; material_owner=NULL; material=NULL; copy_back_buffer=NULL; }
+ CanvasItem() { light_mask=1; vp_render=NULL; next=NULL; final_clip_owner=NULL; clip=false; final_opacity=1; blend_mode=VS::MATERIAL_BLEND_MODE_MIX; visible=true; rect_dirty=true; custom_rect=false; ontop=true; material_owner=NULL; material=NULL; copy_back_buffer=NULL; distance_field=false; }
virtual ~CanvasItem() { clear(); if (copy_back_buffer) memdelete(copy_back_buffer); }
};
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 5b8fb22764..83bfbbc6c3 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -3411,6 +3411,14 @@ void VisualServerRaster::canvas_item_set_clip(RID p_item, bool p_clip) {
canvas_item->clip=p_clip;
}
+void VisualServerRaster::canvas_item_set_distance_field_mode(RID p_item, bool p_distance_field) {
+ VS_CHANGED;
+ CanvasItem *canvas_item = canvas_item_owner.get( p_item );
+ ERR_FAIL_COND(!canvas_item);
+
+ canvas_item->distance_field=p_distance_field;
+}
+
void VisualServerRaster::canvas_item_set_transform(RID p_item, const Matrix32& p_transform) {
diff --git a/servers/visual/visual_server_raster.h b/servers/visual/visual_server_raster.h
index b1970c55b3..72af793278 100644
--- a/servers/visual/visual_server_raster.h
+++ b/servers/visual/visual_server_raster.h
@@ -1128,6 +1128,7 @@ public:
//virtual void canvas_item_set_rect(RID p_item, const Rect2& p_rect);
virtual void canvas_item_set_transform(RID p_item, const Matrix32& p_transform);
virtual void canvas_item_set_clip(RID p_item, bool p_clip);
+ virtual void canvas_item_set_distance_field_mode(RID p_item, bool p_enable);
virtual void canvas_item_set_custom_rect(RID p_item, bool p_custom_rect,const Rect2& p_rect=Rect2());
virtual void canvas_item_set_opacity(RID p_item, float p_opacity);
virtual float canvas_item_get_opacity(RID p_item, float p_opacity) const;
diff --git a/servers/visual/visual_server_wrap_mt.h b/servers/visual/visual_server_wrap_mt.h
index 562b9ffeb0..ded4c6fc00 100644
--- a/servers/visual/visual_server_wrap_mt.h
+++ b/servers/visual/visual_server_wrap_mt.h
@@ -1109,6 +1109,7 @@ public:
//FUNC(canvas_item_set_rect,RID, const Rect2& p_rect);
FUNC2(canvas_item_set_transform,RID, const Matrix32& );
FUNC2(canvas_item_set_clip,RID, bool );
+ FUNC2(canvas_item_set_distance_field_mode,RID, bool );
FUNC3(canvas_item_set_custom_rect,RID, bool ,const Rect2&);
FUNC2(canvas_item_set_opacity,RID, float );
FUNC2RC(float,canvas_item_get_opacity,RID, float );
diff --git a/servers/visual_server.h b/servers/visual_server.h
index c748839d1e..b6d354454e 100644
--- a/servers/visual_server.h
+++ b/servers/visual_server.h
@@ -969,6 +969,7 @@ public:
virtual void canvas_item_set_transform(RID p_item, const Matrix32& p_transform)=0;
virtual void canvas_item_set_clip(RID p_item, bool p_clip)=0;
+ virtual void canvas_item_set_distance_field_mode(RID p_item, bool p_enable)=0;
virtual void canvas_item_set_custom_rect(RID p_item, bool p_custom_rect,const Rect2& p_rect=Rect2())=0;
virtual void canvas_item_set_opacity(RID p_item, float p_opacity)=0;
virtual float canvas_item_get_opacity(RID p_item, float p_opacity) const=0;