diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-10 10:02:38 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-10 10:02:38 +0100 | 
| commit | f455660e9384c5f423cced4e3c302f90aa7dba18 (patch) | |
| tree | d04dbebb9c79f9709398dfa164545629f3c9e275 /servers/text_server.cpp | |
| parent | 7e32a27879ceb8622ca0351b896fe2ec304858f7 (diff) | |
| parent | e9808e3d9a33c170d2b3863d8d24e630f9bda20f (diff) | |
Merge pull request #55572 from aaronfranke/ci-double
Diffstat (limited to 'servers/text_server.cpp')
| -rw-r--r-- | servers/text_server.cpp | 14 | 
1 files changed, 7 insertions, 7 deletions
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);  |