Go to Google Code Home
Google SketchUp SkpReader C++ API Documentation (Labs)

Public Member Functions | Properties

ISkpTexture Interface Reference

A texture object. More...

List of all members.

Public Member Functions

HRESULT WriteToFile ([in] BSTR filename)
 Writes the image to the given file.

Properties

OLE_COLOR Color [get]
 [propget] Returns the average color of the texture.
BSTR Filename [get]
 [propget] Returns the texture's file name, if the texture came from a file.
BSTR Fullname [get]
 [propget] Returns the texture's full file name, including the directory name, if the texture came from a file.
double XScale [get]
 [propget] Returns the size of the image in the X direction.
double YScale [get]
 [propget] Returns the size of the image in the Y direction.

Detailed Description

A texture object.


Member Function Documentation

HRESULT ISkpTexture::WriteToFile ( [in] BSTR  filename  ) 

Writes the image to the given file.

The calling application must ensure that the name of the output file is suffixed with the matching image type from the original image.

To obtain the correct image type, use the XSkpTexture::Fullname property to obtain the file name (which may or may not exist on the current system), and extract the suffix (e.g., jpg, or gif).

Parameters:
filename The name of the file to which the image will be written.
Returns:
S_OK : if successful
S_FALSE : if image could not be written for some reason
E_FAIL : internal errors

Property Documentation

OLE_COLOR ISkpTexture::Color [get]

[propget] Returns the average color of the texture.

Return values:
pVal The average color of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BSTR ISkpTexture::Filename [get]

[propget] Returns the texture's file name, if the texture came from a file.

Return values:
pVal The file name of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
BSTR ISkpTexture::Fullname [get]

[propget] Returns the texture's full file name, including the directory name, if the texture came from a file.

Return values:
pVal The full file name of the texture.
Returns:
S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
double ISkpTexture::XScale [get]

[propget] Returns the size of the image in the X direction.

Return values:
pVal The size of the image in the X direction.
Returns:
S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors
double ISkpTexture::YScale [get]

[propget] Returns the size of the image in the Y direction.

Return values:
pVal The size of the image in the Y direction.
Returns:
S_OK : if successful
E_POINTER : if any of the required arguments are NULL
E_FAIL : internal errors

©2010 Google - Google Home - About Google