|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
These are SDL-specific utilities that don't fit into a single class very well. More...
Functions | |
| SDL_Color | PColorToSDLColor (PColor pcolor) |
| This converts between a PColor and an SDL color. | |
| PColor | SDLColorToPColor (SDL_Color scolor) |
| This converts between an SDL Color and a PColor | |
| void | DrawPixel (SDL_Renderer *renderer, PlatformWidget *pwidget, int x, int y, PColor color) |
| This sets a pixel to be a certain color. | |
| void | DrawLine (SDL_Renderer *renderer, PlatformWidget *pwidget, int x1, int y1, int x2, int y2, PColor color) |
| This sets a pixel to be a certain color. | |
| Uint32 | GetPixel (SDL_Surface *surface, int x, int y) |
| PColor | GetPixelColor (SDL_Surface *surface, int x, int y) |
| This extracts the color of a pixel. | |
| Uint32 | GetPixel (SDL_Renderer *renderer, SDL_Texture *texture, int x, int y) |
| PColor | GetPixelColor (SDL_Renderer *renderer, SDL_Texture *texture, int x, int y) |
| This extracts the color of a pixel. | |
| int | WritePNG (SDL_Renderer *renderer, SDL_Rect *rect, const std::string fname) |
| Variant | GetCurrentScreenResolution () |
| void | CopyToClipboard (std::string text) |
| Variant | CopyFromClipboard () |
| int | PopupErrorBox (PlatformWindow *pwindow, const char *message) |
| long double | GetTimeHP () |
| Variant | GetDriverList (bool printout=true) |
These are SDL-specific utilities that don't fit into a single class very well.
| Variant SDLUtility::CopyFromClipboard | ( | ) |
Definition at line 389 of file SDLUtility.cpp.
Referenced by PEBLEnvironment::CopyFromClipboard().
| void SDLUtility::CopyToClipboard | ( | std::string | text | ) |
Definition at line 379 of file SDLUtility.cpp.
References PError::SignalWarning().
Referenced by PEBLEnvironment::CopyToClipboard().
| void SDLUtility::DrawLine | ( | SDL_Renderer * | renderer, |
| PlatformWidget * | pwidget, | ||
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2, | ||
| PColor | color | ||
| ) |
This sets a pixel to be a certain color.
Definition at line 106 of file SDLUtility.cpp.
References PColor::GetAlpha(), PColor::GetBlue(), PColor::GetGreen(), PColor::GetRed(), PlatformWidget::GetSDL_Texture(), and NULL.
| void SDLUtility::DrawPixel | ( | SDL_Renderer * | renderer, |
| PlatformWidget * | pwidget, | ||
| int | x, | ||
| int | y, | ||
| PColor | color | ||
| ) |
This sets a pixel to be a certain color.
Definition at line 72 of file SDLUtility.cpp.
References PColor::GetAlpha(), PColor::GetBlue(), PColor::GetGreen(), PColor::GetRed(), PlatformWidget::GetSDL_Texture(), PWidget::GetX(), and PWidget::GetY().
Referenced by PlatformWidget::SetPoint().
| Variant SDLUtility::GetCurrentScreenResolution | ( | ) |
Definition at line 320 of file SDLUtility.cpp.
References PList::PushBack(), and PError::SignalFatalError().
Referenced by PEBLEnvironment::GetCurrentScreenResolution(), and PEBLInterpret().
| Variant SDLUtility::GetDriverList | ( | bool | printout = true | ) |
Definition at line 422 of file SDLUtility.cpp.
References NULL, and PList::PushBack().
Referenced by PEBLEnvironment::GetDrivers(), and PlatformWindow::Initialize().
| Uint32 SDLUtility::GetPixel | ( | SDL_Renderer * | renderer, |
| SDL_Texture * | texture, | ||
| int | x, | ||
| int | y | ||
| ) |
Definition at line 197 of file SDLUtility.cpp.
References NULL.
| Uint32 SDLUtility::GetPixel | ( | SDL_Surface * | surface, |
| int | x, | ||
| int | y | ||
| ) |
Definition at line 145 of file SDLUtility.cpp.
Referenced by GetPixelColor().
| PColor SDLUtility::GetPixelColor | ( | SDL_Renderer * | renderer, |
| SDL_Texture * | texture, | ||
| int | x, | ||
| int | y | ||
| ) |
This extracts the color of a pixel.
Definition at line 254 of file SDLUtility.cpp.
References NULL.
| PColor SDLUtility::GetPixelColor | ( | SDL_Surface * | surface, |
| int | x, | ||
| int | y | ||
| ) |
This extracts the color of a pixel.
Definition at line 174 of file SDLUtility.cpp.
References GetPixel().
Referenced by PlatformWidget::GetPixel().
| long double SDLUtility::GetTimeHP | ( | ) |
Definition at line 414 of file SDLUtility.cpp.
Referenced by PEBLEnvironment::GetTimeHP().
| SDL_Color SDLUtility::PColorToSDLColor | ( | PColor | pcolor | ) |
This converts between a PColor and an SDL color.
These are SDL-specific utilities that don't fit into a single class very well.
Definition at line 51 of file SDLUtility.cpp.
References PColor::GetAlpha(), PColor::GetBlue(), PColor::GetGreen(), and PColor::GetRed().
Referenced by PlatformFont::PlatformFont(), PlatformFont::PlatformFont(), PlatformFont::SetBackgroundColor(), PlatformFont::SetFontColor(), and PlatformFont::UpdateSDLColors().
| int SDLUtility::PopupErrorBox | ( | PlatformWindow * | pwindow, |
| const char * | message | ||
| ) |
Definition at line 403 of file SDLUtility.cpp.
References PlatformWindow::GetSDLWindow().
| PColor SDLUtility::SDLColorToPColor | ( | SDL_Color | scolor | ) |
This converts between an SDL Color and a PColor
Definition at line 62 of file SDLUtility.cpp.
| int SDLUtility::WritePNG | ( | SDL_Renderer * | renderer, |
| SDL_Rect * | rect, | ||
| const std::string | fname | ||
| ) |
Definition at line 302 of file SDLUtility.cpp.
Referenced by PlatformWindow::SaveScreenShot().