Hi Jake - please advice me on saving/loading of GoDrawing objetcs:
If you are using GoXmlBindingTransformer, you can just do
t.AddBinding(“points”, “Shape.Points”);
Are you really using the lower level GoXmlWriter?
I ran out of time trying to implement GoXmlBindingTransformer to my old code, will attempt it at a later stage in the meantime i got to carry on the old way. how can i do it the old way?
GoDrawingData data = ((GoDrawing)obj).Data;
WriteAttrVal(attrname, data.Points);
int[] ints = new int[data.Actions.Length];
Array.Copy(data.Actions, ints, ints.Length);
WriteAttrVal(attrname + “Actions”, ints);
and
PointF[] pts = PointFArrayAttr(attrname, null);
int[] ints = Int32ArrayAttr(attrname + “Actions”, null);
if (pts != null && ints != null) {
byte[] acts = new byte[ints.Length];
for (int i = 0; i < acts.Length; i++) {
unchecked {
acts = (byte)ints;
}
}
((GoDrawing)obj).Data = new GoDrawingData(acts, pts);