Jump to content

Flip uploaded graphic 180 degrees


Meir

Recommended Posts

Is there a way to build a rule that will flip a user uploaded graphic 180 degrees.

 

In this particular case the user will be uploading two images. I wish to have one upside down, and the other as is.

 

So I do not want to rotate all uploaded images, just one in particular image from one field.

 

Thank you!

Link to comment
Share on other sites

Sure, just create two separate, overlapping frames, one that's rotated 180 degrees, and one that's not, and write a rule for each one to either include the graphic or not. For instance, one frame would have a rule like so:

if (graphicShouldBeRotated)
   return Resource("YourResource");
//else
return NullResource();

And the other would have the opposite:

if (graphicShouldBeRotated)
   return NullResource();
//else
return Resource("YourResource");

This is similar to the logic which selects a different frame for landscape and portrait graphics:

http://forums.pti.com/showpost.php?p=1367&postcount=2

 

Or, you could put the graphic in both frames, and suppress one of them selectively in OnRecordStart, like so:

if (graphicShouldBeRotated)
   FindGraphicFrame("UnrotatedFrameName").suppress = true;
else
   FindGraphicFrame("RotatedFrameName").suppress = true;

Or, if you have a Producer (FP Direct or Server) license, then you can selectively rotate a single frame in OnRecordStart, like so:

if (graphicShouldBeRotated)
   FindGraphicFrame("YourFrameName").rotationAngle = 180;

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...