Xwt.Drawing.BitmapImage.MakeWrittable C# (CSharp) 메소드

MakeWrittable() 개인적인 메소드

private MakeWrittable ( ) : void
리턴 void
        void MakeWrittable()
        {
            // If the bitmap only has one reference, that reference is the one held by this instance, so
            // no other image is referencing this one. In that case, the bitmap can be safely modified.
            // On the other hand, if the bitmap is being referenced by another image, an local copy
            // has to be made

            if (NativeRef.ReferenceCount > 1) {
                Backend = ToolkitEngine.ImageBackendHandler.CopyBitmap (Backend);
                NativeRef.ReleaseReference (true);
                NativeRef = new NativeImageRef (Backend, ToolkitEngine);
            }
        }

Usage Example

예제 #1
0
파일: BitmapImage.cs 프로젝트: m13253/xwt
		public void CopyArea (int srcX, int srcY, int width, int height, BitmapImage dest, int destX, int destY)
		{
			dest.MakeWrittable ();
			var nr = dest.NativeRef;
			do {
				InitForToolkit (nr.Toolkit);
				nr.Toolkit.ImageBackendHandler.CopyBitmapArea (Backend, srcX, srcY, width, height, nr.Backend, destX, destY);
			} while (nr != dest.NativeRef);
		}
All Usage Examples Of Xwt.Drawing.BitmapImage::MakeWrittable