void Translate() { if (_needPosition) { int horizontal = (int)_horizontal * ActiveDrawable.Width / 100; int vertical = (int)_vertical * ActiveDrawable.Height / 100; SelectedLayer.Translate(horizontal, vertical); } }
void Offset() { var offset = Parameters["Ofst"] as ObjcParameter; if (offset != null) { double horizontal = offset.GetValueAsDouble("Hrzn"); double vertical = offset.GetValueAsDouble("Vrtc"); int h = (int)(horizontal * ActiveDrawable.Width / 100); int v = (int)(vertical * ActiveDrawable.Height / 100); Console.WriteLine("Offset: {0}, {1}", h, v); SelectedLayer.Translate(h, v); } }