Need to accomodate STRING_32 in Gobo

"Colin Adams" <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
I have just implemented the following routine:
	
draw_text (x, y: INTEGER; a_text: STRING_GENERAL) is
			-- Draw `a_text' with left of baseline at (`x', `y') using `font'.
		local
			l_element: XM_ELEMENT
			l_attribute: XM_ATTRIBUTE
			l_text: XM_CHARACTER_DATA
			l_bytes: STRING
			l_utf8: UC_UTF8_STRING
		do
			create l_element.make_last (document.root_element, Svg_text, Svg_namespace)
			create l_element.make_last (Svg_x_attribute, Svg_namespace, x.out, l_element)
			create l_element.make_last (Svg_y_attribute, Svg_namespace,
(-y).out, l_element)
			add_font_attributes (l_element)
			if a_text.is_string_8 then
				create l_text.make_last (l_element, a_text.as_string_8)
			else
				create l_bytes.make (a_text.count * 4)
				from
					i := 1
				until
					i > a_text.count
				loop
					utf8.append_code_to_utf8 (l_bytes, a_text.item_code (i))
					i := i + 1
				end
				create l_utf8.make_from_utf8 (l_bytes)
				create l_text.make_last (l_element, l_utf8)
			end
		end

We need a make_from_utf32 (or some such routine) in UC_STRING (or
alternatively let XM_CHARACTER_DATA accept a STRING_GENEAL, or
prefereably both).

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.