mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-02 14:25:55 +01:00
Remove anti alias settings from PaintCurve2D, as it won't be supported when rendering an image.
This commit is contained in:
parent
014e928e47
commit
cfa067fa56
@ -110,7 +110,7 @@ void PaintCurve2D::_notification(int p_what) {
|
||||
_prepare_render_data_fill(points, uvs, colors, indices);
|
||||
|
||||
if (indices.size()) {
|
||||
RS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, Vector<int>(), Vector<float>(), _fill_texture.is_valid() ? _fill_texture->get_rid() : RID(), -1, RID(), _fill_antialiased);
|
||||
RS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, Vector<int>(), Vector<float>(), _fill_texture.is_valid() ? _fill_texture->get_rid() : RID(), -1, RID(), true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,10 +126,10 @@ void PaintCurve2D::_notification(int p_what) {
|
||||
_prepare_render_data_outline(points, uvs, colors, indices);
|
||||
|
||||
if (indices.size()) {
|
||||
RS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, Vector<int>(), Vector<float>(), _outline_texture.is_valid() ? _outline_texture->get_rid() : RID(), -1, RID(), _outline_antialiased);
|
||||
RS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, Vector<int>(), Vector<float>(), _outline_texture.is_valid() ? _outline_texture->get_rid() : RID(), -1, RID(), true);
|
||||
}
|
||||
} else {
|
||||
draw_polyline(_cached_draw_pts, _outline_color, _outline_width, _outline_antialiased);
|
||||
draw_polyline(_cached_draw_pts, _outline_color, _outline_width, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -227,14 +227,6 @@ bool PaintCurve2D::fill_get_invert() const {
|
||||
return _fill_invert;
|
||||
}
|
||||
|
||||
void PaintCurve2D::fill_set_antialiased(bool p_antialiased) {
|
||||
_fill_antialiased = p_antialiased;
|
||||
update();
|
||||
}
|
||||
bool PaintCurve2D::fill_get_antialiased() const {
|
||||
return _fill_antialiased;
|
||||
}
|
||||
|
||||
void PaintCurve2D::fill_set_invert_border(float p_invert_border) {
|
||||
_fill_invert_border = p_invert_border;
|
||||
update();
|
||||
@ -307,14 +299,6 @@ Size2 PaintCurve2D::outline_get_texture_scale() const {
|
||||
return _outline_tex_scale;
|
||||
}
|
||||
|
||||
void PaintCurve2D::outline_set_antialiased(bool p_antialiased) {
|
||||
_outline_antialiased = p_antialiased;
|
||||
update();
|
||||
}
|
||||
bool PaintCurve2D::outline_get_antialiased() const {
|
||||
return _outline_antialiased;
|
||||
}
|
||||
|
||||
Ref<Image> PaintCurve2D::_get_rendered_image() {
|
||||
if (_rendered_image.is_valid()) {
|
||||
return _rendered_image;
|
||||
@ -843,9 +827,6 @@ void PaintCurve2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("fill_set_invert", "invert"), &PaintCurve2D::fill_set_invert);
|
||||
ClassDB::bind_method(D_METHOD("fill_get_invert"), &PaintCurve2D::fill_get_invert);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("fill_set_antialiased", "antialiased"), &PaintCurve2D::fill_set_antialiased);
|
||||
ClassDB::bind_method(D_METHOD("fill_get_antialiased"), &PaintCurve2D::fill_get_antialiased);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("fill_set_invert_border", "invert_border"), &PaintCurve2D::fill_set_invert_border);
|
||||
ClassDB::bind_method(D_METHOD("fill_get_invert_border"), &PaintCurve2D::fill_get_invert_border);
|
||||
|
||||
@ -873,9 +854,6 @@ void PaintCurve2D::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("outline_set_texture_scale", "texture_scale"), &PaintCurve2D::outline_set_texture_scale);
|
||||
ClassDB::bind_method(D_METHOD("outline_get_texture_scale"), &PaintCurve2D::outline_get_texture_scale);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("outline_set_antialiased", "antialiased"), &PaintCurve2D::outline_set_antialiased);
|
||||
ClassDB::bind_method(D_METHOD("outline_get_antialiased"), &PaintCurve2D::outline_get_antialiased);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve2D"), "set_curve", "get_curve");
|
||||
|
||||
ADD_GROUP("Fill", "fill_");
|
||||
@ -888,7 +866,6 @@ void PaintCurve2D::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "fill_texture_rotation", PROPERTY_HINT_NONE, "", 0), "fill_set_texture_rotation", "fill_get_texture_rotation");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fill_invert_enable"), "fill_set_invert", "fill_get_invert");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "fill_invert_border", PROPERTY_HINT_RANGE, "0.1,16384,0.1"), "fill_set_invert_border", "fill_get_invert_border");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "fill_antialiased"), "fill_set_antialiased", "fill_get_antialiased");
|
||||
|
||||
ADD_GROUP("Outline", "outline_");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "outline_enabled"), "outline_set_enabled", "outline_get_enabled");
|
||||
@ -899,7 +876,6 @@ void PaintCurve2D::_bind_methods() {
|
||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "outline_texture_scale", PROPERTY_HINT_LINK), "outline_set_texture_scale", "outline_get_texture_scale");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "outline_texture_rotation_degrees", PROPERTY_HINT_RANGE, "-360,360,0.1,or_lesser,or_greater"), "outline_set_texture_rotation_degrees", "outline_get_texture_rotation_degrees");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::REAL, "outline_texture_rotation", PROPERTY_HINT_NONE, "", 0), "outline_set_texture_rotation", "outline_get_texture_rotation");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "outline_antialiased"), "outline_set_antialiased", "outline_get_antialiased");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_curve_changed"), &PaintCurve2D::_curve_changed);
|
||||
}
|
||||
@ -915,7 +891,6 @@ PaintCurve2D::PaintCurve2D() {
|
||||
_fill_tex_rot = 0;
|
||||
_fill_invert = false;
|
||||
_fill_invert_border = 100;
|
||||
_fill_antialiased = false;
|
||||
|
||||
_outline_enabled = false;
|
||||
//_outline_color = Color(0.5, 0.6, 1.0, 0.7);
|
||||
@ -924,7 +899,6 @@ PaintCurve2D::PaintCurve2D() {
|
||||
_outline_tex_scale = Vector2(1, 1);
|
||||
_outline_tex_tile = false;
|
||||
_outline_tex_rot = 0;
|
||||
_outline_antialiased = true;
|
||||
|
||||
rect_cache_dirty = true;
|
||||
}
|
||||
|
@ -72,9 +72,6 @@ public:
|
||||
void fill_set_invert(bool p_invert);
|
||||
bool fill_get_invert() const;
|
||||
|
||||
void fill_set_antialiased(bool p_antialiased);
|
||||
bool fill_get_antialiased() const;
|
||||
|
||||
void fill_set_invert_border(float p_invert_border);
|
||||
float fill_get_invert_border() const;
|
||||
|
||||
@ -102,9 +99,6 @@ public:
|
||||
void outline_set_texture_scale(const Size2 &p_scale);
|
||||
Size2 outline_get_texture_scale() const;
|
||||
|
||||
void outline_set_antialiased(bool p_antialiased);
|
||||
bool outline_get_antialiased() const;
|
||||
|
||||
virtual Ref<Image> _get_rendered_image();
|
||||
|
||||
PaintCurve2D();
|
||||
@ -134,7 +128,6 @@ protected:
|
||||
float _fill_tex_rot;
|
||||
bool _fill_invert;
|
||||
float _fill_invert_border;
|
||||
bool _fill_antialiased;
|
||||
|
||||
bool _outline_enabled;
|
||||
Color _outline_color;
|
||||
@ -144,7 +137,6 @@ protected:
|
||||
Vector2 _outline_tex_ofs;
|
||||
bool _outline_tex_tile;
|
||||
float _outline_tex_rot;
|
||||
bool _outline_antialiased;
|
||||
|
||||
mutable bool rect_cache_dirty;
|
||||
mutable Rect2 item_rect;
|
||||
|
Loading…
Reference in New Issue
Block a user