note description: "This class is generated by PNGEiffelCode" status: "See notice at end of class." legal: "See notice at end of class." class SAVE_ICON inherit EV_PIXMAP create make_top_to_bottom, make_left_to_right, make_bottom_to_top, make_right_to_left feature {NONE} -- Initialization make_top_to_bottom (discard_color: EV_COLOR) -- Initialization do make_with_size (14, 14) discard_color_internal := discard_color draw_direction := 1 draw end make_left_to_right (discard_color: EV_COLOR) -- Initialization do make_with_size (14, 14) discard_color_internal := discard_color draw_direction := 2 draw end make_bottom_to_top (discard_color: EV_COLOR) -- Initialization do make_with_size (14, 14) discard_color_internal := discard_color draw_direction := 3 draw end make_right_to_left (discard_color: EV_COLOR) -- Initialization do make_with_size (14, 14) discard_color_internal := discard_color draw_direction := 4 draw end feature {NONE} -- Implementation draw -- Draw current. local i, j, t_count, colors_count, max_len: INTEGER do build_colors colors_count := colors.count max_len := width.max (height) from j := 0 until j >= colors_count loop from i := 0 t_count := colors.item (j).count // 3 until i >= t_count loop if discard_color_internal /= Void implies not (colors.item (j).item (3 * i) = discard_color_internal.red_8_bit and colors.item (j).item (3 * i + 1) = discard_color_internal.green_8_bit and colors.item (j).item (3 * i + 2) = discard_color_internal.blue_8_bit) then set_foreground_color (create {EV_COLOR}.make_with_8_bit_rgb (colors.item (j).item (3 * i), colors.item (j).item (3 * i + 1), colors.item (j).item (3 * i + 2))) inspect draw_direction when 1 then -- Draw top to bottom. draw_point (i, j) when 2 then -- Draw left to right. draw_point (j, max_len - i - 1) when 3 then -- Draw bottom to top. draw_point (t_count - i - 1, colors_count - j + 1) when 4 then -- Draw right to left. draw_point (colors_count - j + 1, i) end end i := i + 1 end j := j + 1 end colors := Void end build_colors -- Build `colors'. do create colors.make_filled (Void, 14) colors.put (<<74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74>>, 0) colors.put (<<74, 73, 74, 173, 174, 99, 74, 73, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 74, 73, 74, 255, 255, 255, 74, 73, 74>>, 1) colors.put (<<74, 73, 74, 173, 174, 99, 74, 73, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 74, 73, 74, 74, 73, 74, 74, 73, 74>>, 2) colors.put (<<74, 73, 74, 173, 174, 99, 74, 73, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 3) colors.put (<<74, 73, 74, 173, 174, 99, 74, 73, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 4) colors.put (<<74, 73, 74, 173, 174, 99, 74, 73, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 5) colors.put (<<74, 73, 74, 173, 174, 99, 74, 73, 74, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 6) colors.put (<<74, 73, 74, 173, 174, 99, 173, 174, 99, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 173, 174, 99, 173, 174, 99, 74, 73, 74>>, 7) colors.put (<<74, 73, 74, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 173, 174, 99, 74, 73, 74>>, 8) colors.put (<<74, 73, 74, 173, 174, 99, 173, 174, 99, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 9) colors.put (<<74, 73, 74, 173, 174, 99, 173, 174, 99, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 10) colors.put (<<74, 73, 74, 173, 174, 99, 173, 174, 99, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 11) colors.put (<<74, 73, 74, 173, 174, 99, 173, 174, 99, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 255, 255, 255, 255, 255, 255, 74, 73, 74, 173, 174, 99, 74, 73, 74>>, 12) colors.put (<<74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74, 74, 73, 74>>, 13) end draw_direction : INTEGER colors: SPECIAL [SPECIAL [INTEGER]] discard_color_internal: EV_COLOR; note copyright: "Copyright (c) 1984-2009, Eiffel Software" license: "GPL version 2 (see http://www.eiffel.com/licensing/gpl.txt)" licensing_options: "http://www.eiffel.com/licensing" copying: "[ This file is part of Eiffel Software's Eiffel Development Environment. Eiffel Software's Eiffel Development Environment is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 of the License (available at the URL listed under "license" above). Eiffel Software's Eiffel Development Environment is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Eiffel Software's Eiffel Development Environment; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ]" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- SAVE_ICON