[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/DotGNU.Images Image.cs,1.6,1.7
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/DotGNU.Images Image.cs,1.6,1.7 |
Date: |
Thu, 02 Oct 2003 05:15:03 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/DotGNU.Images
In directory subversions:/tmp/cvs-serv30537/DotGNU.Images
Modified Files:
Image.cs
Log Message:
Rewrite the "Icon" class; hook icon drawing throughout the system; specify
the frame when creating a toolkit image, to select the correct icon frame.
Index: Image.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/DotGNU.Images/Image.cs,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Image.cs 2 Oct 2003 04:00:37 -0000 1.6
--- Image.cs 2 Oct 2003 05:15:01 -0000 1.7
***************
*** 69,86 ****
this.transparentPixel = -1;
}
! private Image(Image image)
{
this.width = image.width;
this.height = image.height;
this.pixelFormat = image.pixelFormat;
! this.numFrames = image.numFrames;
! if(image.frames != null)
{
! int frame;
! this.frames = new Frame
[this.numFrames];
! for(frame = 0; frame < this.numFrames;
++frame)
{
! this.frames[frame] =
!
image.frames[frame].CloneFrame(this);
}
}
--- 69,95 ----
this.transparentPixel = -1;
}
! private Image(Image image, Frame thisFrameOnly)
{
this.width = image.width;
this.height = image.height;
this.pixelFormat = image.pixelFormat;
! if(thisFrameOnly != null)
{
! this.numFrames = 1;
! this.frames = new Frame [1];
! this.frames[0] =
thisFrameOnly.CloneFrame(this);
! }
! else
! {
! this.numFrames = image.numFrames;
! if(image.frames != null)
{
! int frame;
! this.frames = new Frame
[this.numFrames];
! for(frame = 0; frame <
this.numFrames; ++frame)
! {
! this.frames[frame] =
!
image.frames[frame].CloneFrame(this);
! }
}
}
***************
*** 209,213 ****
public Object Clone()
{
! return new Image(this);
}
--- 218,222 ----
public Object Clone()
{
! return new Image(this, null);
}
***************
*** 370,373 ****
--- 379,388 ----
// TODO: change the size
return (Image)(Clone());
+ }
+
+ // Create a new image that contains a copy of one frame from this image.
+ public Image ImageFromFrame(int frame)
+ {
+ return new Image(this, GetFrame(frame));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/DotGNU.Images Image.cs,1.6,1.7,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingImage.cs, 1.2, 1.3 DrawingToolkit.cs, 1.16, 1.17
- Next by Date:
[Dotgnu-pnet-commits] pnetlib/System.Drawing Graphics.cs, 1.17, 1.18 Icon.cs, 1.3, 1.4
- Previous by thread:
[Dotgnu-pnet-commits] pnetlib/System.Drawing.Xsharp DrawingImage.cs, 1.2, 1.3 DrawingToolkit.cs, 1.16, 1.17
- Next by thread:
[Dotgnu-pnet-commits] pnetlib/System.Drawing Graphics.cs, 1.17, 1.18 Icon.cs, 1.3, 1.4
- Index(es):