/// <summary> /// 別のCubeオブジェクトを連結 /// </summary> /// <param name="other">別のCubeオブジェクト</param> public void Add(Cube other) { // ピクセルを連結 Pixels.AddRange(other.Pixels); // 再度初期化する Initialize(); }
/// <summary> /// Analyzes image by resizing it and storing pixels in list /// </summary> /// <param name="forceReanalyze">If true, the image is analyzed even if it's already been</param> public void AnalyzeImage(bool forceReanalyze = false) { if (Pixels.Count != 0 && !forceReanalyze) { return; } if (forceReanalyze && Pixels.Count > 0) { Pixels.Clear(); } var image = GetImage(); if (image == null) { // Image is invalid _isImage = false; return; } Pixels.AddRange(GetPixels(image)); }
public Image(int size) { Pixels.AddRange(new int[size]); }