String _toImage(int width, int height, _Callback <Image> callback) { // create image and send via callback // only send string if an error occurs. return(this.ToImage(width, height, callback)); // [DONE] native 'Scene_toImage'; }
String _toImage(int width, int height, _Callback <Image> callback) { // create image and send via callback // only send string if an error occurs. // native 'Scene_toImage'; return(string.Empty); // Tmp to resolve build }
public static Future _futurize(Action <_Callback> callback) { // Question, why is this so complicated for running a new Task. // Could be a Dart -> C# translation issue var resolve = new _Callback(() => { }); return(new Future(() => { })); }
public static Future <T> _futurize <T>(Action <_Callback <T> > callback) { // Question, why is this so complicated for running a new Task. // Could be a Dart -> C# translation issue var result = default(T); var resolve = new _Callback <T>((t) => { result = t; }); return(new Future <T>(() => { return result; })); }
public string ToImage(int width, int height, _Callback <SKImage> raw_image_callback) { if (raw_image_callback == null) { return("Image callback was invalid"); } if (m_layerTree == null) { return("Scene did not contain a layer tree."); } if (width == 0 || height == 0) { return("Image dimensions for scene were invalid."); } // We can't create an image on this task runner because we don't have a // graphics context. Even if we did, it would be slow anyway. Also, this // thread owns the sole reference to the layer tree. So we flatten the layer // tree into a picture and use that as the thread transport mechanism. var picture = m_layerTree.Flatten(new SKRect(0, 0, width, height)); if (picture == null) { // Already in Dart scope. return("Could not flatten scene into a layer tree."); } var image = SKImage.FromPicture(picture, new SKSizeI(width, height)); raw_image_callback(image); return(string.Empty); }
public static string InstantiateImageCodec(List <int> list, _Callback <SKCodec> callback, _ImageInfo imageInfo, double decodedCacheRatioCap) { return(null); }