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

Pages: [1] 2 3
1
Graphics / I am tryin an array and i can not make it works ....
« on: March 12, 2010, 09:40:49 pm »
Thank's
Jim

2
Graphics / I am tryin an array and i can not make it works ....
« on: March 12, 2010, 06:39:43 pm »
sf::Text  sIDs[4];
sIDs[0]=L"Hello you..."; // it dont work.

Also ...

sf::Text  sIDs[]={L"hello", L"you"}; // dont work.

How i must make an array of Text?

3
Window / About ctrl + Left arrow
« on: March 12, 2010, 06:36:14 pm »
Ok i will try to read and understud the structure...
Thank's
Jim

4
Window / About ctrl + Left arrow
« on: March 12, 2010, 01:48:15 pm »
Ok i will try.
Thank's
Jim :)

---------------------------------------------------
trying ....

if (Event.Type == sf::Event::KeyPressed && Event.Key.Code == sf::Key::LControl && Event.Key.Code == sf::Key::Left ){ ... }

dont work ...

5
Window / About ctrl + Left arrow
« on: March 12, 2010, 12:25:54 pm »
As i see dont work ...

error: `event' was not declared in this scope

6
Window / About ctrl + Left arrow
« on: March 12, 2010, 11:36:19 am »
I am tryin in events to take the ctrl+left arrow event. First press ctrl, then left  key.
How i can take this event?

7
General / How i can take a substring?
« on: March 11, 2010, 10:51:47 am »
Hello.
I am looking for new_text=text.substr(from, number of chars ...)

Is there a such function?

8
Graphics / How i can see Greek text?
« on: March 10, 2010, 11:00:03 am »
Laurent thank's very mutch ....
Excelent the way with wide chars. I just uderstud the way ...
I see at last my char's, and thank's. Your framework and your job is very-very good.
Good day.
Jim

9
Graphics / How i can see Greek text?
« on: March 10, 2010, 08:57:59 am »
Ok buck again.
I just compile SFML2 with codeblocks 8.02 on XP(With svn version 6088 library not compile), and the i run the program to see my chars ...

Code: [Select]
if (!font.LoadFromFile("i2.ttf"))
sf::Text Text("\x0035, \x2718, \x2719, \x271a, \x271b, \x271c, \x271d, \x271e, \x271f, \x2720, \x2721, \x2722, \x2723, \x2724, \x2725,",font);


In this code i can see only the 5 and ,,,,, but the characters i can not see.
The characters exist and i can see with fontforge and with other applications.

Any idea? Somthing wrong with code or SFML2?

10
Graphics / How i can see Greek text?
« on: March 08, 2010, 06:53:28 pm »
Trying to see character \x271F  of my font, i compile SFML1.5, i imlement default char set with extension bellow...
Code: [Select]

Uint32 Font::ourDefaultCharset[] =
{
    // Printable characters in ASCII range
    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, ....
..........................

// extension
0x2710, 0x2711,

..................


Using these libraries nothing happent. I can not see the 0x2710 character, only the x34, that is 4 i can see...
Code: [Select]

    sf::Font A;
    if (!A.LoadFromFile("i2.ttf"))
        return EXIT_FAILURE;
    sf::String Text("\x271F \x34 ", A, 50);// the 4 i can see it ...




Any suggestion?

11
Graphics / How can i take the shape in image and save?
« on: February 24, 2010, 08:35:20 pm »
I will try freetype2.
Ok Thank's.

12
Graphics / How can i take the shape in image and save?
« on: February 24, 2010, 08:05:30 pm »
Hello. I have a face object. How can i take the shape in image and give to disk?
Thank's
Jim

Code: [Select]

    FT_Library library; /* handle to library */
    FT_Face face; /* handle to face object */
    FT_Error  error;
    error = FT_Init_FreeType(&library);
    error = FT_New_Face( library,"arial.ttf", 0, &face );
    error = FT_Set_Char_Size( face, /* handle to face object */  0, /* char_width in 1/64th of points */  16*64, /* char_height in 1/64th of points */  300, /* horizontal device resolution */  300 ); /* vertical device resolution */
    error = FT_Set_Pixel_Sizes( face, /* handle to face object */  0, /* pixel_width */  16 ); /* pixel_height */
    int glyph_index = FT_Get_Char_Index( face, 0x0039);
    error = FT_Load_Glyph( face,glyph_index,FT_LOAD_NO_BITMAP);
    error = FT_Render_Glyph(face->glyph,FT_RENDER_MODE_MONO);
    FT_GlyphSlot slot = face->glyph; /* a small shortcut */

13
Graphics / How i can see Greek text?
« on: February 19, 2010, 12:13:45 pm »
Thank's
Ok. we waiting next docoumentation.
Jim

14
Graphics / How i can see Greek text?
« on: February 19, 2010, 12:10:38 pm »
Compiling sfml2 take these libraries. The *.a put in C:\Program Files\CodeBlocks\MinGW\lib\ directory, and the *.dll to source project path, and in C:\Program Files\CodeBlocks\MinGW\include\ i put SFML directory.

Quote
libsfml-audio-d.a,libsfml-audio-s-d.a,libsfml-audio-s.a,libsfml-audio.a,libsfml-graphics-d.a,libsfml-graphics-s-d.a,libsfml-g,aphics-s.a,libsfml-graphics.a,libsfml-main-d.a,libsfml-network-d.a,libsfml-network-s-d.a,libsfml-network-s.a,libsfml-netwo,k.a,libsfml-system-d.a,libsfml-system-d.dll.a,libsfml-system-s-d.a,libsfml-system-s.a,libsfml-system.a,libsfml-window-d.a,l,bsfml-window-s-d.a,libsfml-window-s.a,libsfml-window.a
sfml-audio-d.dll,sfml-audio.dll,sfml-graphics-d.dll,sfml-graphics,dll,sfml-network-d.dll,sfml-network.dll,sfml-system-d.dll,sfml-system.dll,sfml-window-d.dll,sfml-window.dll


Linker options i have

Quote
-lsfml-graphics
-lsfml-window
-lsfml-system
-lsfml-audio


and defines SFML_DYNAMIC macro.

Runing the sample ...

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}


all are ok...

But in the next paradigm

Code: [Select]
int main()
{
// Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
// Load a font from a file
    sf::Font MyFont;
    if (!MyFont.LoadFromFile("arial.ttf", 50))
        return EXIT_FAILURE;
// Create a graphical string
    sf::String Hello;
    std::string asd="123 Γεια χαρά, όλα καλά";
    std::wstring asd1=L"456 Γεια χαρά, όλα καλά";
    Hello.SetText("\xf1\xf2...\xfe\xff  \x3c2");


compiller says in LoadFromFile....



Quote
C:\TMP\15\main.cpp||In function `int main()':|
C:\TMP\15\main.cpp|19|error: no matching function for call to `sf::Font::LoadFromFile(const char[10], int)'|
C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\SFML\Graphics\Font.hpp|92|note: candidates are: bool sf::Font::LoadFromFile(const std::string&)|
C:\TMP\15\main.cpp|25|error: 'class sf::String' has no member named 'SetText'|
C:\TMP\15\main.cpp|25|warning: hex escape sequence out of range|
C:\TMP\15\main.cpp|26|error: 'class sf::String' has no member named 'SetFont'|
C:\TMP\15\main.cpp|27|error: 'class sf::String' has no member named 'SetColor'|
C:\TMP\15\main.cpp|28|error: 'class sf::String' has no member named 'SetPosition'|
C:\TMP\15\main.cpp|30|error: 'class sf::String' has no member named 'SetSize'|
C:\TMP\15\main.cpp|52|error: 'class sf::RenderWindow' has no member named 'Capture'|
C:\TMP\15\main.cpp|59|error: no matching function for call to `sf::RenderWindow::Draw(sf::String&)'|
C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\SFML\Graphics\RenderTarget.hpp|70|note: candidates are: void sf::RenderTarget::Draw(const sf::Drawable&)|
C:\Program Files\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\include\SFML\Graphics\RenderTarget.hpp|79|note:                 void sf::RenderTarget::Draw(const sf::Drawable&, const sf::Shader&)|
||=== Build finished: 8 errors, 1 warnings ===|

15
Graphics / compilling SFML2 with CodeBlocks
« on: February 19, 2010, 10:29:45 am »
I just activate sfml-system and rebuild(ctrl+F11). Ok
Next choosing build>rebuild workspace i have problem. Maybe wrong is the CB svn version. I'll change version to default 8.05 and i'll see if runs ok.


Quote


-------------- Clean: Debug DLL_Win32 in sfml-system ---------------

Cleaned "sfml-system - Debug DLL_Win32"

-------------- Clean: Debug DLL_Win32 in sfml-window ---------------

Cleaned "sfml-window - Debug DLL_Win32"

-------------- Clean: Debug DLL_Win32 in sfml-network ---------------

Cleaned "sfml-network - Debug DLL_Win32"

-------------- Clean: Debug DLL_Win32 in sfml-graphics ---------------

Cleaned "sfml-graphics - Debug DLL_Win32"

-------------- Clean: Debug DLL_Win32 in sfml-audio ---------------

Cleaned "sfml-audio - Debug DLL_Win32"

-------------- Build: Debug DLL_Win32 in sfml-system ---------------

Compiling: ..\..\src\SFML\System\Clock.cpp
Compiling: ..\..\src\SFML\System\Lock.cpp
Compiling: ..\..\src\SFML\System\Mutex.cpp
Compiling: ..\..\src\SFML\System\Randomizer.cpp
Compiling: ..\..\src\SFML\System\Sleep.cpp
Compiling: ..\..\src\SFML\System\String.cpp
Compiling: ..\..\src\SFML\System\Thread.cpp
Compiling: ..\..\src\SFML\System\ThreadLocal.cpp
Compiling: ..\..\src\SFML\System\Utf.cpp
Compiling: ..\..\src\SFML\System\Win32\MutexImpl.cpp
Compiling: ..\..\src\SFML\System\Win32\Platform.cpp
Compiling: ..\..\src\SFML\System\Win32\ThreadImpl.cpp
Compiling: ..\..\src\SFML\System\Win32\ThreadLocalImpl.cpp
Linking dynamic library: ..\..\lib\mingw\sfml-system-d.dll
Creating library file: ..\..\lib\mingw\libsfml-system-d.dll.a
Output size is 2.12 MB

-------------- Build: Debug DLL_Win32 in sfml-window ---------------

Compiling: ..\..\src\SFML\Window\Context.cpp
Compiling: ..\..\src\SFML\Window\ContextGL.cpp
Compiling: ..\..\src\SFML\Window\Input.cpp
Compiling: ..\..\src\SFML\Window\VideoMode.cpp
Compiling: ..\..\src\SFML\Window\Win32\ContextWGL.cpp
Compiling: ..\..\src\SFML\Window\Win32\Joystick.cpp
Compiling: ..\..\src\SFML\Window\Win32\VideoModeSupport.cpp
Compiling: ..\..\src\SFML\Window\Win32\WindowImplWin32.cpp
Compiling: ..\..\src\SFML\Window\Window.cpp
Compiling: ..\..\src\SFML\Window\WindowImpl.cpp
Linking dynamic library: ..\..\lib\mingw\sfml-window-d.dll
mingw32-g++.exe: ..\..\lib\mingw\libsfml-system-d.a: No such file or directory
Process terminated with status 1 (0 minutes, 6 seconds)
0 errors, 0 warnings
 


--------------------------------


I just change to CB 8.05 and all are ok.
First in build>rebuild workspace i had problem.
Second activate sfml-system and compile, ok.
Then build>rebuild workspace and all are ok.
Thank's for help and good day.
Jim

Pages: [1] 2 3