Displaying posts filed under

coding

Dec
7
2010

Flex 4 – How to get image minimal cutout

Code snippet to take minimal area from BitmapData where something is painted. For example user will paint something in your Flex application and you want to take minimal area and do object from this painting. (It’s code from bigger project, some refactoring is needed) protected function makeObjectFromDrawing(bmpData:BitmapData):void { var bmpData1bit:BitmapData = new BitmapData(bmpData.width, bmpData.height, true, [...]

Dec
7
2010

Flex 4 – How to embed Fonts and load it from another SWF

Create Font SWF in Flash Profesional Create new Action Script 3.0 project Go to library, use top-right icon and select New Font Select Font and on the ActionScript tab check Export for ActionScript Press F9 and add following code import flash.text.Font; Font.registerFont(FontName); Publish it Load it via Loader in FLex 4 Project private var fontSWF:Loader [...]

Dec
13
2009

aspnet mvc performance

Some tips for ASP.NET MVC performance tunning, that really works. From these slides I recommend: jetBrains dotTrace – for performance tunning and dot.net app and webs tracing Apache Bench (ab.exe in bin directory) from Apache web server – it’s simplier to setup tests than WCAT use LINQ compiled queries Cache links, it takes very much [...]