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

Author Topic: Flip an Image  (Read 986 times)

0 Members and 1 Guest are viewing this topic.

Uzaku

  • Newbie
  • *
  • Posts: 8
    • View Profile
Flip an Image
« on: April 24, 2011, 03:31:11 pm »
Hi, for my Project I need a Background Picture, which is created at run time, due to different Screen-resolutions.
So I have my Image and want to Put a Border arround it.

Code: [Select]
BrushW = Border->GetWidth();
Cx = (Solution.x / BrushW) + 1;
for(int i = 0; i < Cx;++i)
{
BackGround->Copy(*Border, i*BrushW, 0);
BackGround->Copy(*Border, i*BrushW, Solution.y - BrushW);
}


So I have a Border and the Bottom and the Top, but I want one left and right too.
So I would like to Flip my Border Image and Copy it onto the background.
But except for creating a new Image with the swapped values of my Border Image and pixel copying to flip it, i couldnt find a way.
So I was wondering, whether there is a more elegant way.

greetings me

PS: I think flip was the wrong word, I ment a turn by 90 degree

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Flip an Image
« Reply #1 on: April 24, 2011, 06:33:54 pm »
There's no other way than doing it manually.
Laurent Gomila - SFML developer