<!-- $XConsortium: ScalePix.sgm /main/7 1996/10/02 11:48:13 cdedoc $ -->
<!-- (c) Copyright 1996 Digital Equipment Corporation. -->
<!-- (c) Copyright 1996 Hewlett-Packard Company. -->
<!-- (c) Copyright 1996 International Business Machines Corp. -->
<!-- (c) Copyright 1996 Sun Microsystems, Inc. -->
<!-- (c) Copyright 1996 Novell, Inc. -->
<!-- (c) Copyright 1996 FUJITSU LIMITED. -->
<!-- (c) Copyright 1996 Hitachi. -->
<RefEntry Id="CDEMOT.XmGetScaledPixmap">
<RefMeta>
<RefEntryTitle>XmGetScaledPixmap</RefEntryTitle>
<ManVolNum>library call</ManVolNum>
</RefMeta>
<RefNameDiv>
<RefName><Function>XmGetScaledPixmap</Function></RefName>
<RefPurpose>
read a pixmap file and scale it according to pixmap and print resolution
</RefPurpose>
</RefNameDiv>
<RefSynopsisDiv>
<FuncSynopsis Remap="ANSI">
<FuncSynopsisInfo>#include &lt;Xm/Xm.h>
</FuncSynopsisInfo>
<FuncDef>XtEnum <Function>XmGetScaledPixmap</Function></FuncDef>
<ParamDef>Widget <Parameter>widget</parameter></paramdef>
<ParamDef>String <Parameter>image_name</Parameter></ParamDef>
<ParamDef>Pixel <Parameter>foreground</Parameter></ParamDef>
<ParamDef>Pixel <Parameter>background</Parameter></ParamDef>
<ParamDef>int <Parameter>depth</Parameter></ParamDef>
<ParamDef>Double <Parameter>scaling_ratio</Parameter></ParamDef>
</FuncSynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para><function>XmGetScaledPixmap</function> uses its
<symbol role="variable">Widget</symbol>
argument to look up
for a Print Shell ancestor to get the pixmap resolution
and the default printer resolution information to be used
if
<symbol role="variable">scaling_ratio</symbol>
<systemitem class="constant">==0</systemitem>.
</para>
<para>If scaling is 0, and a valid PrintShell is present
<function>XmGetScaledPixmap</function>
applies a ratio equals to
(printer resolution / default pixmap resolution)
before creating the Pixmap on the widget's Screen.
Otherwise, the
<symbol role="variable">scaling_ratio</symbol>
is used in scaling
both dimensions of the image being converted as a Pixmap.
</para>
<para><function>XmGetScaledPixmap</function> completes the
<function>XmGetPixmapByDepth</function> existing
API by making use of the
<symbol role="variable">XmNdefaultPixmapResolution</symbol>
of the rooting
<function>XmPrintShell</function>.
Refer to the
<function>XmGetPixmapByDepth</function> documentation for details.
</para>
<variablelist>
<VarListEntry><term><Symbol Role="Variable">widget</Symbol></term>
<ListItem>
<para>Widget used to determine the default pixmap resolution (of the print shell ancestor).
</para>
</ListItem>
</VarListEntry>
<VarListEntry><term><Symbol Role="Variable">image_name</Symbol></term>
<ListItem>
<para>See XmGetPixmapByDepth for description.
</para>
</ListItem>
</VarListEntry>
<VarListEntry><term><Symbol Role="Variable">foreground</Symbol></term>
<ListItem>
<para>See XmGetPixmapByDepth for description.
</para>
</ListItem>
</VarListEntry>
<VarListEntry><term><Symbol Role="Variable">background</Symbol></term>
<ListItem>
<para>See XmGetPixmapByDepth for description.
</para>
</ListItem>
</VarListEntry>
<VarListEntry><term><Symbol Role="Variable">depth</Symbol></term>
<ListItem>
<para>See XmGetPixmapByDepth for description.
</para>
</ListItem>
</VarListEntry>
<VarListEntry><term><Symbol Role="Variable">scaling_ratio</Symbol></term>
<ListItem>
<para>Indicate the scaling ratio to be applied, or 0.
</para>
</ListItem>
</VarListEntry>
</variablelist>
</refsect1>
<refsect1>
<title>RETURN VALUE</title>
<para>Returns Pixmap or NULL if failed.
</para>
</refsect1>
<refsect1>
<title>ERRORS/WARNINGS</title>
<para>Same as for <function>XmGetPixmapByDepth</function>.
</para>
</refsect1>
<refsect1>
<title>SEE ALSO</title>
<para>&cdeman.XmPrintSetup;, &cdeman.XmPrintShell;, &cdeman.XmRedisplayWidget;
</para>
</refsect1>
</refentry>
