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 - dk123

Pages: [1] 2 3 4
1
Feature requests / Re: sf Image resize
« on: January 02, 2019, 08:44:02 pm »
Hi Hapax,

Thanks for the code and comments! I'd just like to clarify my rationale though.
I'm not necessarily stating I don't know how to get the specific examples done in SFML,
it's that I feel that the resize function seems simple, conained, and common enough that I'm suugesting
an addition to the API.

As you've just shown with the code example, this does seem like a function
that could be given to users with a single function.

2
Feature requests / Re: sf Image resize
« on: December 31, 2018, 04:50:13 pm »
Use cases

a. Saving original textures / images to image files of different size

Is probably the largest use case.

I might say have a screenshot of the screen I want to scale down to a different size upon saving.
Or I might be using the image as a canvas for drawing and may want to resize the canvas at some point.

b. Loading original textures / image to textures of different size

Would be another that comes up often.
For example I might have a button with different images for untouched, touched, clicked.
I'd want to keep each image at the same display size when rendering,
but rather than calculating how much scaling would be needed each user interaction,
it would just make calculations easier if I could resize and cache the images on load,
and then use uniform scale factors for all states.

In terms of API

.resize( width, height )

would be simplest.

If one wants to become pedantic, or SFML wants to add options

.resize( width, height, stretch_method: linear, etc. )

would be nice, but not necessary.

3
Feature requests / sf Image resize
« on: December 31, 2018, 03:57:49 am »
Hi, I feel that resizing an image is a concept that's very common. It would be nice if sf Image, and sf Texture could have functions to actually resize its pixel dimensions.

I've seen threads that recommend pasting things into a rendertexture, window, etc. through a sprite, but this feels way too cumbersome for a concept that should just be simple.

With SFML's first S being 'simple', I feel this would be not only a very useful, but fitting small extension.

4
Audio / Re: Getting audio amplitude
« on: January 30, 2017, 03:48:54 am »
I'm unsure of how to take samples of sf::audio, could you provide a short example?

5
Audio / Getting audio amplitude
« on: January 30, 2017, 02:36:36 am »
Hi, I'm trying to implement a function that opens / closes the character's mouth (graphic) depending on the volume (amplitude) of the voice file currently being played.

I'm trying to read in whether the audio is above a certain amplitude (then thus switch to the open mouth graphic), or not (then thus switch to the closed mouth graphic).

I wasn't sure how to do this with SFML - any ideas?

6
Graphics / Re: Text outline cuts into bold
« on: September 03, 2016, 01:21:32 pm »
I'm talking about the thickness of the outline. I've used thickness 2 - but instead of the outline starting on the outside of the glyph, it seems to be starting inside the glyph. The image on the right is an example of how the outline might look like if the outline actually does start outside the glyph - but if you compare the 2 images I've put up, you can see that the glyph (white) on the left is thinner than the glyph on the right.

The result from SFML doesn't necessarily have to equal the result on the right (the one where I manually just draw black outlines repeatedly). But at the very least, the white part (the original text) shouldn't be getting thinner, which seems like a bug that's occurring right now.

7
Graphics / Text outline cuts into bold
« on: August 31, 2016, 04:56:29 am »
Hi, I'm still testing out the outline capabilities in the 2.4 update. I've noticed that the outline cuts into the size of the bold text, this seems like a bug that needs to be fixed.

I've attached an image with the bold text's outline set in ver 2.4 (left), and an image where I just print the text again in 8 directions around the bold text (right). It's quite apparent that the outline is cutting into the width of the bold, resulting in what looks like visually 'burnt' text.


8
Graphics / Re: Text set outline results in uneven outlines
« on: August 31, 2016, 03:38:57 am »
Rounding the position down to integer coordinates solved the issue. Thanks!

9
Graphics / Text set outline results in uneven outlines
« on: August 30, 2016, 02:26:16 pm »
Hi, I've been testing out the outline feature shipped with sfml 2.4, but I'm noticing uneven outlines.
I've set my outline colour to black (0,0,0,255) and an outline thickness of 1.5, but as you can see in the screenshot, the outline thicknesses are uneven (even within the same letter)


10
Feature requests / Re: Stroke text using FreeType capabilities
« on: August 24, 2016, 09:37:22 am »

11
Feature requests / Re: Stroke text using FreeType capabilities
« on: August 20, 2016, 02:26:22 pm »
Hi, this seems like a great feature, and possibly simply to do - has this received any attention since the last post?

12
General / Re: sf::Font::getGlyph getting the code point
« on: August 05, 2016, 03:22:57 pm »
A code point is just the integer representation of a character. So you basically pass in a char, e.g. font.getGlyph(L'2', 10, false).

It would be nice if this was a default override of sf::Font::getGlyph if not already implemented.
What do you mean by "this" and what default override?

Thanks, that helps. I thought there might need to be some sort of conversion (indexing) between the char and the integer representation, which is why I mentioned that it might be nice to have an overloaded function for sf::Font::getGlyph that explicitly takes in a char_t or wchar_t.

Might be nice to add this to the class information to make things clearer.

13
General / sf::Font::getGlyph getting the code point
« on: August 05, 2016, 07:02:07 am »
Hi, I'm trying to get glyph information for certain characters within a string. sf::Font::getGlyph however seems to take a codepoint int as it's argument though, which I'm finding difficulty in finding. How can find the codepoint of a given character?

It would be nice if this was a default override of sf::Font::getGlyph if not already implemented.

14
General / Multithreading texture loading and drawing
« on: July 16, 2016, 04:13:47 am »
Hi, I was wondering if it would be possible to load a texture in one thread, while another thread continues to draw. I'm noticing that if I try to load textures above 1mb, this can start causing lag up to roughly 200ms causing fps drops in drawing, and was wondering if this could be mitigated by using multiple threads.

15
System / sf::err output to wofstream
« on: November 02, 2015, 08:35:02 pm »
Hi, I'm currently using a wofstream to output to my debug file with wide characters.
I was wondering if sf::err() could somehow take in a wofstream instead of an ofstream.

Does anyone have any ideas?

Pages: [1] 2 3 4
anything