locked
Blend Copy and Rotate RRS feed

  • Question

  • Greetings,

    I have made a circle in Blend and placed 20px heigh by 3px wide lines at 0 degrees and 180 degrees perpendicular to and directly against the inside path of the circle. What I want to do is to select, copy, and paste (on top of the original) both of the lines (I already know how to do that).

    This is where I need help:

    I then want to simultaneously rotate both of the lines 45 degrees based on the center point of the circle. The end result would be the two opposing lines with one at 45 degrees and the other at 225 degrees perpendicular to and directly against the inside path of the circle. I want to do this a second time but at different locations. 

    I know how to do this in Expression Design but I cannot figure out how to do this in Blend. I would very much appreciate some help with what must be a simple task for those of you here in this forum.

    Peace,  
    Phroneo
    Friday, April 17, 2009 4:33 PM

Answers

  • I think you are saying that the lines are parallel to each other, but tangent to points at 0 and 180 degrees on the circle.

    If you want to make a copy and rotate with the center of the circle. I think you can just move the "center" point for each object and rotate them independently. However, it sounds like they are parallel and equi-distant from the center of the circle, so you should be able to group them into a Grid or Canvas and then just rotate the Grid/Cavas as that Grid/Canvas will likely already have its center point the same as the circle.

    Hope that helps.

    (You move a center point by clicking the circle point in the center of a object and dragging it somewhere else. For a line, you make have to zoom in to find it.)

    Additional, the XAML property for an object's center point is:

    RenderTransformOrigin=".5,.5" <- this is the default if you dont change it, .5 the object width/height from the origin which is the upper left. To move the point to the bottom right corner, it would "1,1", upper right would be "1,0", etc. Negative values or values greater than width/height will move the center outside the object, etc.
    • Marked as answer by Phroneo Saturday, April 18, 2009 4:06 PM
    Friday, April 17, 2009 6:14 PM

All replies

  • I think you are saying that the lines are parallel to each other, but tangent to points at 0 and 180 degrees on the circle.

    If you want to make a copy and rotate with the center of the circle. I think you can just move the "center" point for each object and rotate them independently. However, it sounds like they are parallel and equi-distant from the center of the circle, so you should be able to group them into a Grid or Canvas and then just rotate the Grid/Cavas as that Grid/Canvas will likely already have its center point the same as the circle.

    Hope that helps.

    (You move a center point by clicking the circle point in the center of a object and dragging it somewhere else. For a line, you make have to zoom in to find it.)

    Additional, the XAML property for an object's center point is:

    RenderTransformOrigin=".5,.5" <- this is the default if you dont change it, .5 the object width/height from the origin which is the upper left. To move the point to the bottom right corner, it would "1,1", upper right would be "1,0", etc. Negative values or values greater than width/height will move the center outside the object, etc.
    • Marked as answer by Phroneo Saturday, April 18, 2009 4:06 PM
    Friday, April 17, 2009 6:14 PM
  • Greetings,

    Thank you for your suggestion.  I got it to work for one copy and rotate but ran into some trouble because I was trying to copy the original copy and it didn't want to play nice for me.  But when I came back and reread your post, I was able to make it work.

    Peace,
    Phroneo
    Saturday, April 18, 2009 4:03 PM