diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_canvas_cull.cpp | 2 | ||||
-rw-r--r-- | servers/text_server.cpp | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index 7b70483571..591023c820 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -786,7 +786,7 @@ void RendererCanvasCull::canvas_item_add_texture_rect(RID p_item, const Rect2 &p if (p_tile) { rect->flags |= RendererCanvasRender::CANVAS_RECT_TILE; rect->flags |= RendererCanvasRender::CANVAS_RECT_REGION; - rect->source = Rect2(0, 0, fabsf(p_rect.size.width), fabsf(p_rect.size.height)); + rect->source = Rect2(0, 0, ABS(p_rect.size.width), ABS(p_rect.size.height)); } if (p_rect.size.x < 0) { diff --git a/servers/text_server.cpp b/servers/text_server.cpp index edc6e66042..2303f27495 100644 --- a/servers/text_server.cpp +++ b/servers/text_server.cpp @@ -649,13 +649,13 @@ PackedInt32Array TextServer::shaped_text_get_line_breaks_adv(RID p_shaped, const return lines; } -PackedInt32Array TextServer::shaped_text_get_line_breaks(RID p_shaped, real_t p_width, int p_start, uint16_t /*TextBreakFlag*/ p_break_flags) const { +PackedInt32Array TextServer::shaped_text_get_line_breaks(RID p_shaped, float p_width, int p_start, uint16_t /*TextBreakFlag*/ p_break_flags) const { PackedInt32Array lines; const_cast<TextServer *>(this)->shaped_text_update_breaks(p_shaped); const Vector2i &range = shaped_text_get_range(p_shaped); - real_t width = 0.f; + float width = 0.f; int line_start = MAX(p_start, range.x); int last_safe_break = -1; int word_count = 0; @@ -1035,9 +1035,9 @@ Vector<Vector2> TextServer::shaped_text_get_selection(RID p_shaped, int p_start, return ranges; } -int TextServer::shaped_text_hit_test_grapheme(RID p_shaped, real_t p_coords) const { +int TextServer::shaped_text_hit_test_grapheme(RID p_shaped, float p_coords) const { // Exact grapheme hit test, return -1 if missed. - real_t off = 0.0f; + float off = 0.0f; int v_size = shaped_text_get_glyph_count(p_shaped); const Glyph *glyphs = shaped_text_get_glyphs(p_shaped); @@ -1053,7 +1053,7 @@ int TextServer::shaped_text_hit_test_grapheme(RID p_shaped, real_t p_coords) con return -1; } -int TextServer::shaped_text_hit_test_position(RID p_shaped, real_t p_coords) const { +int TextServer::shaped_text_hit_test_position(RID p_shaped, float p_coords) const { int v_size = shaped_text_get_glyph_count(p_shaped); const Glyph *glyphs = shaped_text_get_glyphs(p_shaped); @@ -1165,7 +1165,7 @@ int TextServer::shaped_text_prev_grapheme_pos(RID p_shaped, int p_pos) const { return p_pos; } -void TextServer::shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_pos, real_t p_clip_l, real_t p_clip_r, const Color &p_color) const { +void TextServer::shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_pos, float p_clip_l, float p_clip_r, const Color &p_color) const { TextServer::Orientation orientation = shaped_text_get_orientation(p_shaped); bool hex_codes = shaped_text_get_preserve_control(p_shaped) || shaped_text_get_preserve_invalid(p_shaped); @@ -1262,7 +1262,7 @@ void TextServer::shaped_text_draw(RID p_shaped, RID p_canvas, const Vector2 &p_p } } -void TextServer::shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vector2 &p_pos, real_t p_clip_l, real_t p_clip_r, int p_outline_size, const Color &p_color) const { +void TextServer::shaped_text_draw_outline(RID p_shaped, RID p_canvas, const Vector2 &p_pos, float p_clip_l, float p_clip_r, int p_outline_size, const Color &p_color) const { TextServer::Orientation orientation = shaped_text_get_orientation(p_shaped); bool rtl = (shaped_text_get_direction(p_shaped) == DIRECTION_RTL); |