|
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
namespace net.grool.util
{
public delegate void RefreshPictureDelegate(Image im);
public class PicDoc
{
public event RefreshPictureDelegate refreshPicture;
string url = string.Empty;
public string Url
{
get { return url; }
set { url = value; }
}
PSize picSize = null;
Image im = null;
public Image Image
{
get { return im; }
set
{
im = value;
refreshPicture(im);
}
}
public PSize PicSize
{
get { return picSize; }
set { picSize = value; }
}
public Image getSizedImage(Image im)
{
return new Bitmap(im, picSize.getBaseSize);
}
}
public class PSize
{
Size pSize;
public Size getBaseSize
{
get { return pSize; }
set { pSize = value; }
}
public int Width
{
get { return pSize.Width; }
set { pSize.Width = value; }
}
public int Height
{
get { return pSize.Height; }
set { pSize.Height = value; }
}
public PSize(int width, int height)
{
pSize.Width = width;
pSize.Height = height;
}
public override string ToString()
{
return string.Format("{0}X{1}", pSize.Width, pSize.Height);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.