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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mario1159

Pages: [1]
1
DotNet / Re: Error loading images/textures
« on: October 16, 2018, 09:22:54 pm »
To clarify, you were able to load the exact same image using System.Drawing but not SFML?
yes

2
DotNet / Re: Error loading images/textures
« on: October 16, 2018, 09:21:58 pm »
thanks, also is there any way to change the "format" (limitation properties) of the incompatible images keeping the jpeg format?

3
DotNet / Error loading images/textures
« on: September 22, 2018, 04:01:08 am »
My program let the user select an image (examine) and load it.
Most of the images load and display fine but some of them throw an exception
(SFML.LoadingFailedException: 'Failed to load texture from file C:\Users\ ... \t_bg.jpg')
  in the following line:
Image img = new Image(path);
or
Texture texture = new Texture(path);
At first i thought it could be the path that is wrong so i tested opening a file that throw the exception in the search bar of a windows folder and it opened successfully.
To confirm that the path is not wrong i tried creating an image but with System.Drawing and it didn't gave me an exception.

Next i thought maybe it has to do with the security so i placed this in my code:
        [FileIOPermissionAttribute(SecurityAction.PermitOnly,
     ViewAndModify = @"C:\Users\ ... \(folder that cointains t_bg.jpg file)\")]
But it didnt work either.

What could be the problem?

4
DotNet / Re: Inheritance question [SOLVED]
« on: July 16, 2018, 06:52:24 pm »
Yes, im working in c# and thanks for the recommendation

5
DotNet / Re: Inheritance question
« on: July 15, 2018, 04:54:34 am »
It works! thanks and also thanks for the quote about my inheritance flow because im a beginner in concepts of oop and my code always tend to look like a spaghetti

6
DotNet / Re: Inheritance question
« on: July 15, 2018, 01:22:16 am »
Shape doesnt have a definition for GetSize (https://www.sfmldev.org/documentation/2.5.0/classsf_1_1Shape.php)
however the RectangleShape has the getSize method but i cant access to that in my sGameObject class
or maybe i didnt understood your answer correctly.

7
DotNet / Inheritance question [SOLVED]
« on: July 14, 2018, 10:50:11 pm »

I want to access to the rectangle/convex/circle methods in my sGameObject, dGameObjects or Player class but i dont know how, because my current class sGameObject just have a Shape {get;set;} so i can create for example a sGameObject doing this:
RectangleShape rectangleShape = new RectangleShape(new Vector2f(50f,50f));
SGameObject box = new SGameObject();
box.Shape = rectangleShape;

//but i cant access to the RectangleShape methods
box.RectangleShape.getSize(); // error
 

Pages: [1]