Skip to content

Instantly share code, notes, and snippets.

@qoh
Last active April 16, 2016 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qoh/c189df74a46e044ec30fcee6225af5f6 to your computer and use it in GitHub Desktop.
Save qoh/c189df74a46e044ec30fcee6225af5f6 to your computer and use it in GitHub Desktop.
function GuiBitmapCtrl::resizeToImage(%this)
{
if (!%this.isAwake())
{
error("GuiBitmapCtrl::resizeToImage can only be called on visible controls.");
return "";
}
%this.extent = "0 0";
if (!isObject($GuiInspectorHandle))
$GuiInspectorHandle = new GuiInspector();
$GuiInspectorHandle.inspect(%this);
$GuiInspectorHandle.apply(%this.getName());
return %this.extent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment