Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How can I group shapes/lines together?  (Read 3232 times)

0 Members and 1 Guest are viewing this topic.

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
How can I group shapes/lines together?
« on: December 08, 2010, 03:38:26 am »
Hey everyone!

I am trying to draw a ton of small arrows, which I then set the positions of, and rotate around the center of the arrow. Right now I'm doing it with regular lines and it's working fine, but I eventually want arrows. However, it would be a pain in the ass to rotate the two lines that make the head of the arrow around the center of the thing:




So my question is, is there any way to group the lines together so that I can manipulate them as a single, larger object?

Thanks!!

DeadLeaves

  • Newbie
  • *
  • Posts: 8
    • View Profile
How can I group shapes/lines together?
« Reply #1 on: December 08, 2010, 05:44:47 pm »
Wouldn't it work to use an image? Or make a polygon?

heishe

  • Full Member
  • ***
  • Posts: 121
    • View Profile
How can I group shapes/lines together?
« Reply #2 on: December 08, 2010, 05:52:22 pm »
I think you can set the center of the other arrows two head lines to the middle of the other line, so they rotate around that.

danman

  • Hero Member
  • *****
  • Posts: 1121
    • View Profile
    • Email
How can I group shapes/lines together?
« Reply #3 on: December 08, 2010, 08:33:05 pm »
in fact, you need some transformations to be shared with all the arrows, so you could use something like a layer (a box that contains your arrows) :

http://www.sfml-dev.org/wiki/fr/sources/layer
Pointilleur professionnel

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
How can I group shapes/lines together?
« Reply #4 on: December 10, 2010, 07:19:41 am »
Quote from: "DeadLeaves"
Wouldn't it work to use an image? Or make a polygon?


I suppose I could be clever and make a polygon that has no lines that cross, but I made a simple arrow out of a polygon with 4 or 5 lines, and it came out pretty awful. An image might not be a bad idea, but arrows drawn with lines seemed like the natural solution because they have to be resized and rotated a lot.

declan

  • Newbie
  • *
  • Posts: 34
    • View Profile
How can I group shapes/lines together?
« Reply #5 on: December 10, 2010, 07:21:02 am »
Quote from: "heishe"
I think you can set the center of the other arrows two head lines to the middle of the other line, so they rotate around that.


This is a clever idea...I think I'll try it. Still, I don't see why there wouldn't be some sort of group option.