mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +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:
@@ -212,6 +212,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
{
|
||||
return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl);
|
||||
}
|
||||
|
||||
public vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
|
||||
{
|
||||
return m_OSSL_Functions.osGetDrawStringSize(contentType, text, fontName, fontSize);
|
||||
}
|
||||
|
||||
public void osSetStateEvents(int events)
|
||||
{
|
||||
m_OSSL_Functions.osSetStateEvents(events);
|
||||
|
||||
Reference in New Issue
Block a user