mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
From: Christopher Yeoh <yeohc@au1.ibm.com>
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.
This commit is contained in:
@@ -43,6 +43,8 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
int updateTimer);
|
||||
UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data, string extraParams,
|
||||
int updateTimer, bool SetBlending, byte AlphaValue);
|
||||
void GetDrawStringSize(string contentType, string text, string fontName, int fontSize,
|
||||
out double xSize, out double ySize);
|
||||
}
|
||||
|
||||
public interface IDynamicTextureRender
|
||||
@@ -54,5 +56,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
byte[] ConvertStream(Stream data, string extraParams);
|
||||
bool AsyncConvertUrl(UUID id, string url, string extraParams);
|
||||
bool AsyncConvertData(UUID id, string bodyData, string extraParams);
|
||||
void GetDrawStringSize(string text, string fontName, int fontSize,
|
||||
out double xSize, out double ySize);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user