Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong FloatRect returned with Text.GetGlobalBounds() #12

Closed
regisf opened this issue Jun 9, 2012 · 1 comment
Closed

wrong FloatRect returned with Text.GetGlobalBounds() #12

regisf opened this issue Jun 9, 2012 · 1 comment

Comments

@regisf
Copy link

regisf commented Jun 9, 2012

Under Linux and Mono I've a severe issue. I'm trying to get the object globalbounds but it returns the wrong top/left value.
I've tested this with :

using System;

using SFML.Graphics;
using SFML.Window;

namespace TestGlobalBounds
{
    public class Program
    {
        private RenderWindow win;
        private Text text;

        public Program ()
        {
            win = new RenderWindow(new VideoMode(800,600), "Hello world");
            text = new Text ("Hello world");
            text.Position = new Vector2f(100,100);
            Console.WriteLine (text.GetGlobalBounds());
        }

        public static void Main( string[] args)
        {
            Program prog = new Program();
        }
    }
}

With this result : [FloatRect] Left(1) Top(7) Width(145) Height(24)

So I wrote the same program directly in C with the good result : 107.000000:101.000000:145.000000:24.000000

The same issue occurred with Sprite object.

It seems to be the interface between C# and C whose do its job wrong.

I will search if this issue occurred under Windows and try to fix the issue.

@LaurentGomila
Copy link
Member

Thanks, it's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants