aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-08-03Fix the recent windows compile error by putting newFont for case "R" in ↵Justin Clark-Casey (justincc)1-3/+8
VectorRenderModule inside its own context, rather than disposing of the old font before using it as a prototype for the new.
2012-08-03attempting to fix a build issueSignpostMarv1-2/+2
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
2012-08-03Properly dispose of all GDI+ entities used in VectorRenderModule for dynamic ↵Justin Clark-Casey (justincc)1-253/+316
textures. The convention is that if an object implements IDiposable() the code must explicitly call Dispose() or call it via the using statement. This may be particularly important for GDI+ objects since they encapsulate native code entities.
2011-11-02Get some hopefully more useful exception information when ↵Justin Clark-Casey (justincc)1-3/+4
OpenJPEG.EncodeFromImage() fails in VectorRender and DynamicTexture modules
2010-12-10Normalization of OSSL function names.Marck1-11/+12
Added the following replacement functions for compliance to the OSSL standards stated on the wiki: osGetTerrainHeight osSetTerrainHeight osGetSunParam osSetSunParam osSetPenColor The functions that do not comply to the standard give a warning when used but work normally otherwise. The graphics primitive drawing command "PenColor" has also been added as well as dynamic texture parameter "bgcolor" as an alternative to "bgcolour". The following two functions have been renamed because they are not enabled yet aynway: osWindParamSet => osSetWindParam osWindParamGet => osGetWindParam
2010-02-04minor: one method docJustin Clark-Casey (justincc)1-0/+1
2010-01-29Revert "Updates all IRegionModules to the new style region modules."Melanie1-27/+14
This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf.
2010-01-23Updates all IRegionModules to the new style region modules.Revolution1-14/+27
Signed-off-by: Melanie <melanie@t-data.com>
2009-10-01Formatting cleanup.Jeff Ames1-4/+4
2009-08-31oops. fixing missing argument.dr scofield (aka dirk husemann)1-1/+1
2009-08-31adding log message to vector render to inform about default font being useddr scofield (aka dirk husemann)1-0/+1
2009-08-31- making font name used by VectorRenderModule configurable: can be setdr scofield (aka dirk husemann)1-3/+12
via [VectorRender] font_name = "Comic Sans MS" in OpenSim.ini - adding osSetFontName OSSL function
2009-08-28Implements osDrawPolygon, similar to already implemented osDrawFilledPolygonArthur Valadares1-0/+6
2009-08-25Implemented osPenCap, that sets EndCap and StartCap to Pen. This allows ↵Arthur Valadares1-7/+70
using arrow, diamond, round and flat caps. * Made image request safer, if it can't find an image for any reason, draws a square where the image should be and a message alerting the user.
2009-08-21Adds osDrawPolygon to OSSL. Works a little different then other OS Drawing ↵Arthur Valadares1-11/+37
functions, this one has no start and end point, but a number of points that will form the desired polygon. Only FilledPolygon implemented so far. * Also added some LSL transparent type conversion, as it's done in LSL scripting (string to integer, float to string, etc)
2009-06-03From: Chris Yeoh <yeohc@au1.ibm.com>Dr Scofield1-7/+13
- fixes wild swings in memory usage related to usage of GetDrawStringSize() We've been seeing wild swings in memory usage and a large chunk of memory leak. From analysing this it's pretty clear that the mono garbage collector is rather buggy! When exercised heavily it looks like it frees more than its meant to resulting in crashes. GetDrawStringSize() measures the size in pixels of text. To do this memory for an image is allocated and used to call the GDI text measure functions. Although no reference to the temporary memory for the measuring is kept, it takes quite a while for the mono garbage collector to clean up - so if lots calls to GetDrawStringSize() are made at once there can be a spike in memory usage. If the garbage collector is not fast enough then the GDI layer runs out of memory. It also looks like the garbage collector is not always reclaiming all of the memory. I've attached an OpenSim patch which works around the garbage collector issues. Instead of dynamically allocating memory for measuring text sizes, it serialises (on a per region basis) access to a single block of memory. The effect of this is to be nicer to the garbage collector as it has a lot less work to do, at the cost of some theoretical loss in performance (nothing noticeable with our tests which hit it pretty hard). OpenSim still does leak memory slowly, but it is a lot more stable with this patch. I suspect that either the garbage collector misses bits of freed memory or the GDI/cairo layer leaks a bit each time a texture is created. Thats going to be a lot harder to hunt down, but for reference if someone has OpenSim running on Windows it would be interesting to see if it has the same problem as it would tell us if its a mono/GDI problem or an OpenSim problem.
2009-06-01Minor: Change OpenSim to OpenSimulator in older copyright headers and ↵Jeff Ames1-1/+1
LICENSE.txt.
2009-04-18Thank you kindly, StrawberryFride, for a patch that:Charles Krinke1-5/+10
Adds a test to see if the first option on osDynamicTextureData is "AltDelim", then picks up the first character after the whitespace and uses as a delimiter instead of ;. If this string does not appear at the start of the data, the default ; will be used, hence this should not break existing code.
2009-02-22Mantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that:Charles Krinke1-2/+6
* Added log4net dependency to physxplugin in prebuild.xml. * Added missing m_log fields to classes. * Replaced Console.WriteLine with appropriate m_log.Xxxx * Tested that nant test target runs succesfully. * Tested that local opensim sandbox starts up without errors.
2009-02-22Update svn properties, add copyright headers, minor formatting cleanup.Jeff Ames1-21/+21
2009-02-21Applied patch from mantis #3217, which allows Dynamic Images of type RGB (so ↵MW1-7/+23
with no alpha value). Thanks BlueWall.
2009-02-20Update svn properties, add copyright headers, minor formatting cleanup.Jeff Ames1-49/+43
2009-02-19Mantis#3188. Thank you kindly, BlueWall, for a patch that:Charles Krinke1-3/+49
Adding the ability to set the background color for osSetDynamicTextureData in the extra data: bgcolour:value (see http://msdn.microsoft.com/en-us/library/aa358802.aspx [^] for color names)
2009-02-18From: Christopher Yeoh <yeohc@au1.ibm.com>Sean Dague1-0/+14
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.
2009-02-12large scale fix for svn props after "the great refactor"Sean Dague1-12/+12
2009-02-12* optimized usings.lbsa711-12/+12
2009-02-10this is step 2 of 2 of the OpenSim.Region.Environment refactor.Dr Scofield1-1/+1
NOTHING has been deleted or moved off to forge at this point. what has happened is that OpenSim.Region.Environment.Modules has been split in two: - OpenSim.Region.CoreModules: all those modules that are either directly or indirectly referenced from other OpenSim packages, or that provide functionality that the OpenSim developer community considers core functionality: CoreModules/Agent/AssetTransaction CoreModules/Agent/Capabilities CoreModules/Agent/TextureDownload CoreModules/Agent/TextureSender CoreModules/Agent/TextureSender/Tests CoreModules/Agent/Xfer CoreModules/Avatar/AvatarFactory CoreModules/Avatar/Chat/ChatModule CoreModules/Avatar/Combat CoreModules/Avatar/Currency/SampleMoney CoreModules/Avatar/Dialog CoreModules/Avatar/Friends CoreModules/Avatar/Gestures CoreModules/Avatar/Groups CoreModules/Avatar/InstantMessage CoreModules/Avatar/Inventory CoreModules/Avatar/Inventory/Archiver CoreModules/Avatar/Inventory/Transfer CoreModules/Avatar/Lure CoreModules/Avatar/ObjectCaps CoreModules/Avatar/Profiles CoreModules/Communications/Local CoreModules/Communications/REST CoreModules/Framework/EventQueue CoreModules/Framework/InterfaceCommander CoreModules/Hypergrid CoreModules/InterGrid CoreModules/Scripting/DynamicTexture CoreModules/Scripting/EMailModules CoreModules/Scripting/HttpRequest CoreModules/Scripting/LoadImageURL CoreModules/Scripting/VectorRender CoreModules/Scripting/WorldComm CoreModules/Scripting/XMLRPC CoreModules/World/Archiver CoreModules/World/Archiver/Tests CoreModules/World/Estate CoreModules/World/Land CoreModules/World/Permissions CoreModules/World/Serialiser CoreModules/World/Sound CoreModules/World/Sun CoreModules/World/Terrain CoreModules/World/Terrain/DefaultEffects CoreModules/World/Terrain/DefaultEffects/bin CoreModules/World/Terrain/DefaultEffects/bin/Debug CoreModules/World/Terrain/Effects CoreModules/World/Terrain/FileLoaders CoreModules/World/Terrain/FloodBrushes CoreModules/World/Terrain/PaintBrushes CoreModules/World/Terrain/Tests CoreModules/World/Vegetation CoreModules/World/Wind CoreModules/World/WorldMap - OpenSim.Region.OptionalModules: all those modules that are not core modules: OptionalModules/Avatar/Chat/IRC-stuff OptionalModules/Avatar/Concierge OptionalModules/Avatar/Voice/AsterixVoice OptionalModules/Avatar/Voice/SIPVoice OptionalModules/ContentManagementSystem OptionalModules/Grid/Interregion OptionalModules/Python OptionalModules/SvnSerialiser OptionalModules/World/NPC OptionalModules/World/TreePopulator
2009-02-06This changeset is the step 1 of 2 in refactoringDr Scofield1-2/+2
OpenSim.Region.Environment into a "framework" part and a modules only part. This first changeset refactors OpenSim.Region.Environment.Scenes, OpenSim.Region.Environment.Interfaces, and OpenSim.Region.Interfaces into OpenSim.Region.Framework.{Interfaces,Scenes} leaving only region modules in OpenSim.Region.Environment. The next step will be to move region modules up from OpenSim.Region.Environment.Modules to OpenSim.Region.CoreModules and then sort out which modules are really core modules and which should move out to forge. I've been very careful to NOT BREAK anything. i hope i've succeeded. as this is the work of a whole week i hope i managed to keep track with the applied patches of the last week --- could any of you that did check in stuff have a look at whether it survived? thx!
2009-02-02[previous VectorRender patch was from: Robert SmartDr Scofield1-1/+1
<SMARTROB@uk.ibm.com>] clean up.
2009-02-02[patching previous patch and also taking the chance of fixing theDr Scofield1-2/+2
previous commit message] This patch reimplements the Draw method in the VectorRenderModule which is used to create dynamic textures. The previous version was limited to creating square dynamic textures, it also didnt allow for dynamically loading an image containing transparency except at 256x256. The extraParams string in such functions as osSetDynamicTextureData can now be passed a comma seperated string of name value pairs which set the width,height and alpha value of dynamic textures. e.g. "height:512,width:2048,alpha:255" Backward compatibility is still preserved so passing the old params of either a string integer "256" "512" will still work in the same fashion as will passing "setAlpha" on its own
2009-02-02Merge branch 'vector' into OpenSimulator.orgDr Scofield1-22/+141
2009-01-21* More friendly OpenJpeg error handling.Teravus Ovares1-1/+11
* Often times now the only reason OpenJpeg doesn't work is because it requires Glibc 2.4 The error messages reflect that. * In J2kDecoder module, It stops trying to decode modules if it encounters a dllnotfound exception and instead sends a full resolution layer that causes the texture sender to only send the full resolution image. (big decrease in texture download speed, but it's better then nasty repeating error messages)
2008-12-30Update svn properties, minor formatting cleanup.Jeff Ames1-1/+1
2008-12-19let you specify a hex number as the color in the vector renderingSean Dague1-1/+11
module. This expands the colors you can use.
2008-09-06* This is the fabled LibOMV update with all of the libOMV types from JHurlimanTeravus Ovares1-7/+6
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
2008-06-18revert 5134. Changing these bitmaps to 24bit just breaks things, and they ↵Sean Dague1-1/+1
never display on the client.
2008-06-18make neb happy. I found where we initialized the dynamic textures toSean Dague1-1/+1
32bit images and changed them to 24bit images.
2008-06-18change the default drawing font from Times -> Arial, asSean Dague1-4/+12
san serif fonts are a bit easier on the eyes on textures. Add a new "FontName" attribute that can be used to override the font type.
2008-05-16Formatting cleanup.Jeff Ames1-1/+1
2008-05-01* Rolled back a few changes.Adam Frisby1-3/+7
2008-05-01* Spring cleaning on Region.Environment. Adam Frisby1-7/+3
* Converted a large number of read-only fields to be actually, readonly. * Reformatted code sections. * Removed redundant code.
2008-05-01Update svn properties. Minor formatting cleanup.Jeff Ames1-368/+368
2008-04-30* Cruft removal step #1. Cleaning Modules directory.Adam Frisby1-62/+70
2008-04-30* Refactored Environment/Modules directory - modules now reside in their own ↵Adam Frisby1-361/+361
directory with any associated module-specific classes. * Each module directory is currently inside one of the following category folders: Agent (Anything relating to do with Client<->Server communications.), Avatar (Anything to do with the avatar or presence inworld), Framework (Classes modules can use), Grid (Grid traffic, new OGS2 grid comms), Scripting (Scripting functions, etc), World (The enrivonment/scene, IE Sun/Tree modules.) * This should be moved into a seperate project file.
2008-04-21* Optimised using statements and namespace references across entire project ↵Adam Frisby1-9/+11
(this took a while to run).
2008-03-21Comment out an unused 'str' and add a WriteLine to useCharles Krinke1-1/+4
an "Exception e" with e.ToString() to eliminate 2 warnings.
2008-03-18Formatting cleanup.Jeff Ames1-36/+37
2008-03-18Added copyright messages. Set svn:eol-style. Minor cleanup.Jeff Ames1-11/+31
2008-03-13some hackery with the VectorRenderModule to let you pass in a canvasSean Dague1-2/+13
size. Helps make the fonts crisp when using vector renderer as a text board.
2008-03-09Linux Compile error if Color is compared against null. Documentation for ↵Teravus Ovares1-3/+8
System.Drawing.Color says it returns a Color with all Components as 0 if the String passed isn't a known color, so the null check has been commented out