From 383f8b3ac601baef7b2cb322f53fb36b69367286 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 18 Feb 2009 12:56:36 +0000 Subject: From: Christopher Yeoh The attached patch implements osGetDrawStringSize that looks like: vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) in LSL. It is meant to be used in conjunction with the osDraw* functions. It returns accurate information on the size that a given string will be rendered given the specified font and font size. This allows for nicely formatted and positioned text on the generated image. --- .../CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/CoreModules/Scripting/LoadImageURL') diff --git a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs index 2eb8fc0..96618e0 100644 --- a/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/LoadImageURL/LoadImageURLModule.cs @@ -84,6 +84,13 @@ namespace OpenSim.Region.CoreModules.Scripting.LoadImageURL return false; } + public void GetDrawStringSize(string text, string fontName, int fontSize, + out double xSize, out double ySize) + { + xSize = 0; + ySize = 0; + } + #endregion #region IRegionModule Members -- cgit v1.1