|
of_getpicturesize
|
|
Full name
|
pfc_n_cst_dssrv_report.of_getpicturesize
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_getpicturesize(string,ref integer,ref integer)
|
Name
|
Datatype
|
li_Height
|
Integer
|
li_Len
|
Integer
|
li_Return
|
Integer
|
li_Size
|
Integer
|
li_Width
|
Integer
|
lp_Temp
|
Picture
|
lw_parent
|
Window
|
public function integer of_getpicturesize (string as_pictname, ref integer ai_height, ref integer ai_width);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_GetPictureSize
//
// Access: public
//
// Arguments:
// as_PictName The file name containing the picture.
// ai_Height The height of the picture in PB units, passed by reference.
// ai_Width The width of the picture in PB units, passed by reference.
//
// Returns: Integer
// 1 if successful, -1 if an error occurrs.
//
// Description: Calculate the size of a picture object in PowerBuilder Units.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
Integer li_Size, li_Height, li_Width, li_Len, li_Return
Picture lp_Temp
Window lw_parent
ids_requestor.of_GetParentWindow (lw_parent)
// Create a dummy Picture Object on the window
li_Return = lw_parent.OpenUserObject(lp_Temp)
If li_Return = 1 Then
lp_Temp.Visible = False
lp_Temp.PictureName = as_PictName
lp_Temp.OriginalSize = True
// Set reference arguments to the height and width
ai_Height = lp_Temp.Height
ai_Width = lp_Temp.Width
li_Return = lw_parent.CloseUserObject(lp_Temp)
End if
Return li_Return
end function