A cross-platform UI framework for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

41 lines
995 B

// -----------------------------------------------------------------------
// <copyright file="BitmapImpl.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Cairo.Media.Imaging
{
using System;
using Perspex.Platform;
using Cairo = global::Cairo;
public class BitmapImpl : IBitmapImpl
{
public BitmapImpl(Cairo.ImageSurface surface)
{
this.Surface = surface;
}
public int PixelWidth
{
get { return this.Surface.Width; }
}
public int PixelHeight
{
get { return this.Surface.Height; }
}
public Cairo.ImageSurface Surface
{
get;
private set;
}
public void Save(string fileName)
{
this.Surface.WriteToPng(fileName);
}
}
}