Advertisement
Advertisement
| 06.12.2008 at 08:48PM PDT, ID: 23481720 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: |
using System;
using System.Drawing;
using System.Collections;
namespace ADS.WorkstationPC
{
/// <summary>
/// Summary description for SignatureToBitmap.
/// </summary>
public class SignatureToBitmap
{
private static SignatureToBitmap UniqueBitmap = new SignatureToBitmap();
private SignatureToBitmap()
{
//
// TODO: Add constructor logic here
//
}
public static Bitmap GetBitmap(byte[] rawsignature)
{
Bitmap bmSignature = new Bitmap(254, 254);
Graphics gr = Graphics.FromImage(bmSignature);
Pen pen = new Pen(new SolidBrush(Color.Black), 1);
ArrayList alline = new ArrayList();
ArrayList alpoint = new ArrayList();
foreach (byte abyte in rawsignature)
{
alpoint.Add((int)abyte);
if (alpoint.Count > 1)
{
Point apoint = new Point((int)alpoint[0], (int)alpoint[1]);
alpoint.Clear(); // clear the array list
alline.Add(apoint); //adds to the end of the array list
if (apoint.X == 255)
alline.Clear();
else if (alline.Count > 1)
{
Point firstpoint = (Point)alline[0]; //?
alline.RemoveAt(0); // removes the element at that index
gr.DrawLine(pen, firstpoint, apoint);
}
}
}
return bmSignature;
}
}
}
|