private static void __SelectShape(int left, int top, int right, int bottom, int shape, bool anti_alias, int action_event) { // WORKITEM: Support con.phEventIntersectWith as the action_event // Desc2 var Desc2 = PSX.CreateDescriptorForRectangle(left, top, right, bottom); // Ref1 var Ref1 = PSX.MakeNewReference(); Ref1.PutProperty((int)con.phClassChannel, 1718838636); // Desc1 var Desc1 = PSX.MakeNewDescriptor(); Desc1.PutReference((int)con.phKeyNull, Ref1); Desc1.PutObject((int)con.phKeyTo, shape, Desc2); Desc1.PutBoolean((int)con.phKeyAntiAlias, PSX.int_from_bool(anti_alias)); // Play the event in photoshop PSX.PlayEvent(action_event, Desc1, (int)con.phDialogSilent, PSX.PlayBehavior.checkresult); }