|
|
|
|
|
|
if (drawCmd is DrawPloygon4) { |
|
|
|
var drawPloygon4 = (DrawPloygon4) drawCmd; |
|
|
|
this.drawPloygon4(drawPloygon4.points, drawPloygon4.paint); |
|
|
|
} else if (drawCmd is DrawRect) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawRect) { |
|
|
|
} else if (drawCmd is DrawRectShadow) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawRectShadow) { |
|
|
|
} else if (drawCmd is DrawPicture) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawPicture) { |
|
|
|
} else if (drawCmd is DrawConcat) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawConcat) { |
|
|
|
} else if (drawCmd is DrawSave) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawSave) { |
|
|
|
} else if (drawCmd is DrawSaveLayer) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawSaveLayer) { |
|
|
|
} else if (drawCmd is DrawRestore) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawRestore) { |
|
|
|
saveCount--; |
|
|
|
if (saveCount < 0) { |
|
|
|
throw new Exception("unmatched save/restore in picture"); |
|
|
|
|
|
|
} else if (drawCmd is DrawClipRect) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawClipRect) { |
|
|
|
} else if (drawCmd is DrawClipRRect) { |
|
|
|
} |
|
|
|
else if (drawCmd is DrawClipRRect) { |
|
|
|
} else { |
|
|
|
} |
|
|
|
else { |
|
|
|
throw new Exception("unknown drawCmd: " + drawCmd); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public void drawImageRect(Rect src, Rect dst, Paint paint, Image image) { |
|
|
|
if (image != null) |
|
|
|
{ |
|
|
|
if (image != null) { |
|
|
|
Texture2D _texture = new Texture2D(0, 0); |
|
|
|
_texture.LoadImage(image.rawData); |
|
|
|
Graphics.DrawTexture(dst.toRect(), _texture); |
|
|
|
|
|
|
(float) rect.width, |
|
|
|
(float) rect.height)); |
|
|
|
mat.SetVector("UIWidgets_GUIClipRectRadius", new Vector4(0, 0, 0, 0)); |
|
|
|
} else { |
|
|
|
} |
|
|
|
else { |
|
|
|
var rrect = this._clipRec.rrect; |
|
|
|
var rect = rrect.outerRect; |
|
|
|
mat.SetVector("UIWidgets_GUIClipRect", new Vector4( |
|
|
|
|
|
|
(float) rrect.brRadius, |
|
|
|
(float) rrect.blRadius)); |
|
|
|
} |
|
|
|
} else { |
|
|
|
} |
|
|
|
else { |
|
|
|
mat.SetMatrix("UIWidgets_GUIClipMatrix", Matrix4x4.identity); |
|
|
|
var rect = Rect.largest; |
|
|
|
mat.SetVector("UIWidgets_GUIClipRect", new Vector4( |
|
|
|