Class Image

Summary

#
  This class loads an image from file and displays it.  The
  image should be in GIF format.  A border may be included
  with {toggle_draw_border()}.

  The size of the area into which the image is drawn must be
  set with {set_size()}.

Superclasses:
Component

Package:
(main)
File:
_image.icn
Methods:
display, handle_event, set_filename, set_internal_alignment, set_scale_up

Methods inherited from Component:
accepts_tab_focus, attrib, clear_accepts_tab_focus, clear_draw_border, clear_is_shaded, clear_no_updates, do_shading, error, final_setup, finally, firstly, generate_all_components, generate_components, get_cbwin_reference, get_cwin_reference, get_h_reference, get_parent_Dialog, get_parent_buffer_win, get_parent_win, get_visible_reference, get_w_reference, get_x_reference, get_y_reference, got_focus, handle_notify, in_region, is_hidden, is_shaded, is_unhidden, is_unshaded, lost_focus, parse_pos, redisplay, resize, set_abs_coords, set_abs_size, set_accepts_tab_focus, set_align, set_attribs, set_attribs_list, set_draw_border, set_is_shaded, set_no_updates, set_parent_Dialog, set_pos, set_size, set_tooltip, toggle_draw_border, toggle_is_shaded, unique_end, unique_start

Methods inherited from MetaComponent:
set_fields

Methods inherited from Ticker:
is_ticking, retime_ticker, set_ticker, stop_ticker, tick

Fields:
filename, scale_up_flag, x_internal_alignment, y_internal_alignment

Source code.

Details
Constructor

Image(argv)

Methods:

display(buffer_flag)

This method overrides display in class Component

handle_event(e)

This method overrides handle_event in class Component

set_filename(x)


  Set the name of the file from which to load the image;
  re-display the image from the new file if appropriate.


set_internal_alignment(x, y)

#
  Set the horizontal and vertical alignment of the image within the
  area of the component; {x} should be ``l'', ``c'' or ``r'', {y} should
  be ``t'', ``c'' or ``b''.  Default is ``c'', ``c''.


set_scale_up()


  If set, then the image will be scaled up to fit in the space
  specified by {set_size()}.  The image will not be distorted,
  but will be expanded to fill one of the dimensions depending
  on its shape.  If the image is bigger than the specified size
  then it will always be scaled down.


Fields:
filename

scale_up_flag

x_internal_alignment

y_internal_alignment


This page produced by UniDoc on 2021/04/15 @ 23:59:53.