C# Class Softbuild.Media.WriteableBitmapCoreExtensions

画像の拡張メソッド
Mostrar archivo Open project: CH3COOH/Softbuild.Media

Public Methods

Method Description
DrawRect ( this bmp, IEnumerable drawRects, Color color ) : WriteableBitmap

指定した複数の矩形を指定した色で塗りつぶす

DrawRect ( this bmp, Rect drawRect, Color color ) : WriteableBitmap

指定した矩形を指定した色で塗りつぶす

GetPixels ( this bmp ) : byte[]

ビットマップの2-Dテクスチャを表す配列を取得します

GetRect ( this bmp ) : Rect
GetSize ( this bmp ) : Size
Resize ( this bmp, int destWidth, int destHeight ) : WriteableBitmap

リサイズする

Save ( this bmp, string fileNameWithoutExtension ) : void

画像をJPEGフォーマットでピクチャーライブラリへ保存する

SaveToCameraRoll ( this bmp, string fileNameWithoutExtension ) : void

画像をJPEGフォーマットでピクチャーライブラリへ保存する

Private Methods

Method Description
GetAspectRatio ( double srcWidth, double srcHeight, double dstWidth, double dstHeight ) : Size

画像比率を維持したまま指定されたサイズに収まる最大画像サイズを計算する

Method Details

DrawRect() public static method

指定した複数の矩形を指定した色で塗りつぶす
public static DrawRect ( this bmp, IEnumerable drawRects, Color color ) : WriteableBitmap
bmp this
drawRects IEnumerable
color Color
return WriteableBitmap

DrawRect() public static method

指定した矩形を指定した色で塗りつぶす
public static DrawRect ( this bmp, Rect drawRect, Color color ) : WriteableBitmap
bmp this
drawRect Rect
color Color
return WriteableBitmap

GetPixels() public static method

ビットマップの2-Dテクスチャを表す配列を取得します
public static GetPixels ( this bmp ) : byte[]
bmp this WriteableBitmapオブジェクト
return byte[]

GetRect() public static method

public static GetRect ( this bmp ) : Rect
bmp this
return Rect

GetSize() public static method

public static GetSize ( this bmp ) : Size
bmp this
return Size

Resize() public static method

リサイズする
public static Resize ( this bmp, int destWidth, int destHeight ) : WriteableBitmap
bmp this WriteableBitmapオブジェクト
destWidth int 変形後の幅
destHeight int 変形後の高さ
return WriteableBitmap

Save() public static method

画像をJPEGフォーマットでピクチャーライブラリへ保存する
public static Save ( this bmp, string fileNameWithoutExtension ) : void
bmp this 保存するWriteableBitmapオブジェクト
fileNameWithoutExtension string 拡張子を除く保存ファイル名
return void

SaveToCameraRoll() public static method

画像をJPEGフォーマットでピクチャーライブラリへ保存する
public static SaveToCameraRoll ( this bmp, string fileNameWithoutExtension ) : void
bmp this 保存するWriteableBitmapオブジェクト
fileNameWithoutExtension string 拡張子を除く保存ファイル名
return void