-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathImageView.h
More file actions
48 lines (36 loc) · 1.11 KB
/
ImageView.h
File metadata and controls
48 lines (36 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// ImageView.h
// KSDL
//
// Created by Kyle Koser on 5/20/14.
// Copyright (c) 2014 Kyle Koser. All rights reserved.
//
#ifndef __FinalFourFearsomeFantasy__ImageView__
#define __FinalFourFearsomeFantasy__ImageView__
#include <iostream>
#include <SDL2/SDL.h>
#include "SDL2_image/SDL_image.h"
#include "LTexture.h"
#include "View.h"
#include <string>
class ImageView : public View {
public:
//copy constructor to fix image rendering issue
ImageView( ImageView const &other);
ImageView( std::string aFileName, SDL_Renderer *aRenderer );
ImageView( SDL_Rect aFrame, std::string aFileName, SDL_Renderer *aRenderer);
virtual ~ImageView();
double getDegs();
SDL_RendererFlip getDir();
void setDegs(double value);
SDL_RendererFlip flipRight();
SDL_RendererFlip flipLeft();
virtual void drawInRect( SDL_Rect aRect );
private:
double degs; //degrees of rotation
SDL_RendererFlip flipDir = SDL_FLIP_NONE;
LTexture texture;
string textFile;
void load(); //used for lazy loading
};
#endif /* defined(__FinalFourFearsomeFantasy__ImageView__) */