Posts tagged: graphics

Mask Effect for EffectLayer for Pebble

By , April 15, 2015 9:42 am

I’ve written before about EffectLayer library for Pebble smartwatch I’ve been working on. The idea is – user places the layer over screen and that layer applies an effect to screen content.

I’ve started with a few basic effects (invert, mirror) but since then several more developers joined the project adding more cool features. Ron added 90° rotation, zoom and lens effect. Gregoire Sage added cool blur effect. LeFauve not only added FPS effect, but also optimized the library to run the effects in a very efficient way: now effect can be defined as a function (even user defined function!) and that function passed as a parameter to effect_layer_add_effect method along with parameters for that effect.

I, for my part, contributed “mask” effect. What it does is essentially lets you show parts of background image thru user defined mask, creating a feel of transparency. Continue reading 'Mask Effect for EffectLayer for Pebble'»

FusionCharts.RenderChart and ASP.NET UpdatePanel

By , January 17, 2013 5:13 pm

Fusion Charts

FusionCharts is a very cool cross-platform charting library – it offers huge variety of chart types and mind-blowing special effects. It also offers wide variety of chart rendering options both client- and server-side.

One such option is to render chart in an ASP.NET application. FusionCharts.dll that you get with the package offers handy FusionCharts.RenderChart method that generates all the client-side code you need to display a beautiful chart. Usually it is used something like this:

xLabel1.text = FusionCharts.RenderChart("FusionCharts/Pie2D.swf", "", sChartXmlData, sChartID, iChartWidth, iChartHeight, False, True)

where xLabel1 is a Label or Literal control in your ASPX page and FusionCharts.RenderChart is a function that accepts number of parameters, like chart type, chart XML data, dimensions etc.

It works very well until you want to render the chart inside of Microsoft Ajax UpdatePanel – then nothing works. This happens because FusionCharts.RenderChart function emits some HTML along with JavaScript that do not work during partial postback. FusionCharts suggest hooking up to UpdatePanel life-cycle events, but it’s seems like an overkill, and often doesn’t work (especially if you have a complex project, which this hookup can interfere with). But there’s an alternative solution.
Continue reading 'FusionCharts.RenderChart and ASP.NET UpdatePanel'»

ASP.NET Chart Control is not rendering image

By , April 26, 2010 10:48 am

If you’re using MS Chart Control for .NET Framework 3.5 SP1 (in .NET Framework 4.0 it comes as a part of a framework), you may experience a strange behavior when chart images aren’t rendered on the page:

Chart image isn't rendering

If you’re using HTTP Handler to serve chart images (image URL looks something like “…/ChartImg.axd?i=chart_24dae5cb1f024c4a89f4fe492f05cc59_0.png“) missing mapping in IIS configuration could be to blame Continue reading 'ASP.NET Chart Control is not rendering image'»

Serving image from ASP.NET MSChart to external applications via WebService

By , January 6, 2010 4:37 pm

I have an existing ASP.NET application that uses Microsoft Charting control for .NET. I created a CCharting class that hold several methods related to getting data for the chart, applying chart appearance etc. Main method of that class is

Public Sub DrawChart(ByVal i_omsChart As Chart, ByVal i_iChartWidth As Integer, ByVal i_iChartHeight As Integer)

As a 1st parameter it accepts actual chart control from the page, 2nd and 3rd are chart width and height. The method then gets the data for the chart, binds chart to that data, applies chart appearance (colors, series, axises) etc. So drawing a chart is a simple as instantiating the class and calling the method:

Dim oCharting As New CCharting

where xmsChart is a chart control from HTML markup of the page. The result is displayed on the page:

But now I needed to give access to that chart to external applications, that do not have access neither to chart data nor to Microsoft charting control, may run under different OS’s, be Web apps or not. Continue reading 'Serving image from ASP.NET MSChart to external applications via WebService'»

Microsoft Chart for ASP.NET 3.5: Correctly setting image storage location

By , December 24, 2009 2:25 pm

If you’re using Microsoft Chart control for .NET 3.5 you can specify where and how chart images are stored. And if for this purpose you’re trying to use Chart HTTP Handler setting in web config similar to this:

<add key="ChartImageHandler" value="storage=file;url=./Temp"/>

and it is failing (for example chart images are alway created in the root folder of your Web application) – there is an alternative. You can specify location of the images in properties of the chart control itself:

Just add relative path to your storage folder in front of the chart sequence string in “ImageLocation” property. and specify “UseImageLocation” for “ImageStorageMode” property

Running older games under Windows 7/Vista

By , November 27, 2009 12:46 pm

If you have Windows 7 (or, God forbid, Vista) and trying to run games designed for older Windows version, you may experience 2 issues – game crashes on start and game starts, but displays weird colors. Classic example is “Worms Armageddon”.

Worms Armageddon
Continue reading 'Running older games under Windows 7/Vista'»

Easy rounded corners in pure HTML/CSS

By , August 13, 2009 9:44 pm

Rounded corners add nice touch to look and feel of a Web Page. User interface that employs rounded corners looks more streamlined, more ergonomic. Often to achieve that effect images are used, but this approach doesn’t allow quick style update and has other issues. Fortunately there is another way:

Compare 2 following DIVs:

First uses pretty basic CSS/HTML:

<style type="text/css">
    border: solid 1px blue;

<div style="text-align:center">
    <div class="normal">

Let’s take a closer look at the second: Continue reading 'Easy rounded corners in pure HTML/CSS'»

Free alternative to Dundas Charts from Microsoft

By , June 16, 2009 12:53 pm

Since Dundas licensing scheme turned out to be insane, I was looking for an alternative and found this beauty

This free control from Microsoft is based on older version of Dundas chart, but offers pretty much the same features and almost the same API (minus some AJAX UI features). It requires .NET 3.5 SP1 and integrates into Visual Studio 2008 toolbar.

Happy charting 🙂

DHTML JavaScript Graphics – draw without flash

By , January 16, 2008 1:05 pm

This JavaScript VectorGraphics library provides graphics capabilities for JavaScript: functions to draw circles, ellipses (ovals), oblique lines, polylines and polygons (for instance triangles, rectangles) dynamically into a webpage. Usage of this Vector Graphics library should be easy even if you don’t have JavaScript experience
This is very cool. This javascript graphics libary allows you to draw pretty much any shape, image or text directly into HTML without 3rd party plug-ins like Flash. Speed is amazing and it’s cross-browser compatable too. Get it at

Panorama Theme by Themocracy