0% found this document useful (0 votes)
27 views1 page

Public Brushsize Brushalpha Clear Getimage

This application allows users to create images online using Silverlight 4. It provides drawing tools like a round brush, size selection, opacity selection, and a clear option. The interface uses a grid layout with the canvas on the left for editing, tools below, and a button to convert the drawn image. While saving images was considered, additional libraries would be needed so it was not implemented. Key properties and methods support the brush size, opacity, and clearing/retrieving the image. Drawing is done in three layers: a grid for geometries, a cursor canvas, and an input canvas to collect mouse inputs. The application captures mouse movement to continue drawing and renders paths of connected ellipses and rectangles based on the user's strokes.

Uploaded by

Ioana Bota
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Public Brushsize Brushalpha Clear Getimage

This application allows users to create images online using Silverlight 4. It provides drawing tools like a round brush, size selection, opacity selection, and a clear option. The interface uses a grid layout with the canvas on the left for editing, tools below, and a button to convert the drawn image. While saving images was considered, additional libraries would be needed so it was not implemented. Key properties and methods support the brush size, opacity, and clearing/retrieving the image. Drawing is done in three layers: a grid for geometries, a cursor canvas, and an input canvas to collect mouse inputs. The application captures mouse movement to continue drawing and renders paths of connected ellipses and rectangles based on the user's strokes.

Uploaded by

Ioana Bota
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

This application gives the possibility to creat images online , based on Silverlight 4.

It provides the following features: a round Brush, size selection of brush, brush opacity and a Clear option. For organizing the application, a Grid was used: in the left we have the canvas for editing the image, the Clear button, and under the canvas the size and opacity selectors. In the middle there is a Get Image command button which makes the conversion from the drawn mage to ImageSource. A save to disk option, or conversion to .jpg/.bmp/.png type was not implemented since it raises some difficulties and additional libraries are necessary. The following public properties and methods were used in implementation:

BrushSize - Dependency property. Brush size BrushAlpha - Dependency property. Brush opacity Clear() -Clear canvas GetImage() - Get current image

There are 3 layers that make possible the drowing of the image:

Sheet - It is a grid that contains geometries that have been drawn. CursorCanvas - Contains brush cursor and cross cursor InputCanvas - Collects all mouse inputs.

First, it is necessary to capture the mouse, to avoid drawing to be finished after user moves out of the control. Next, a path is created with selected opacity and dropped into Sheet. Geometry variable contains geometry that is drawn right now. The path is created by drawing a set of ellipses connected by rectangles. In the end the path is rendered . For this application the following tools are necessary: Silverlight 4 Tools for Visual Studio 2010, Silverlight 4 Runtime, Microsoft Expression Blend 4 Silverlight available at : http://www.silverlight.net/downloads

You might also like