Tk::Photo images | |
PPresenter Manual Images
Options: functionsExamples
|
An important part of the design of
Portable Presenter is the requirement for
screen-size independency; fonts and also images are scaled, dependent on
the actual screen-size.
You can defined Tk::Photo images in two ways:
tkPhoto optionsThere are no special options for tkPhoto objects: the general options define all.tkPhoto functionsEach Tk::Photo object is related to a MainWindow, to one viewport. To create one, you need to reach the window, so require the help of PPresenter:$show->image($show->Photo(..options..)); my $vp = $show->find(viewport => 'default'); $show->image($vp->Photo(..options..)); my $vp = $show->addViewport(...); my $p = $vp->Photo(...); $show->image($p);The problem now, is that the image is defined for only one viewport: the `selected viewport' of the show, in the first case (i.e. thè window if you have only one); the viewport named `default' in the second case; and the explicitly added viewport in the last case. If you want to use an image for more than one viewport, you do not have to take care yourself: PPresenter makes a copy for each viewport where it is used in.
One PPresenter::Image object is created on the ExamplesExample 1: Own symbols for unordered listsUsually, the dots used to precede a list-item in an unordered list (for instance used by the markup formatter), is defined by the decoration option-nestImages . The dots can be specified as filename or as
objects.
use PPresenter; my @p; $p[0] = $show->Photo(-file => 'redball.gif'); $p[1] = $show->Photo(-file => 'blueball.pct'); $show->change( decoration => 'ALL' , -nestImages => [ undef, @p ] )
Portable Presenter is written and maintained by Mark Overmeer. Copyright (C) 2000-2002, Free Software Foundation FSF. |