Skip to content

Commit ed26594

Browse files
authored
Merge pull request #371 from scratchcpp/remove_image_api
Remove image api
2 parents bd7b539 + ca7cafc commit ed26594

40 files changed

+5
-1420
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
sudo apt-get update
24-
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev
24+
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev
2525
shell: bash
2626
- name: Configure CMake
2727
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

.github/workflows/utests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install dependencies
2222
run: |
2323
sudo apt-get update
24-
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev libgd-dev
24+
sudo apt-get install -y nlohmann-json3-dev libutfcpp-dev
2525
shell: bash
2626
- name: Configure CMake
2727
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DLIBSCRATCHCPP_BUILD_UNIT_TESTS=ON

CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ target_sources(scratchcpp
4949
include/scratchcpp/sprite.h
5050
include/scratchcpp/itimer.h
5151
include/scratchcpp/keyevent.h
52-
include/scratchcpp/iimageformat.h
53-
include/scratchcpp/iimageformatfactory.h
5452
include/scratchcpp/rect.h
5553
include/scratchcpp/igraphicseffect.h
5654
include/scratchcpp/comment.h
@@ -65,8 +63,6 @@ include_directories(thirdparty/zip/src)
6563

6664
include_directories(thirdparty/spimpl)
6765

68-
include(build/FindGD.cmake)
69-
7066
target_link_libraries(scratchcpp PRIVATE nlohmann_json::nlohmann_json)
7167
target_link_libraries(scratchcpp PRIVATE utf8cpp)
7268
target_link_libraries(scratchcpp PRIVATE zip)

build/FindGD.cmake

Lines changed: 0 additions & 121 deletions
This file was deleted.

include/scratchcpp/costume.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#pragma once
44

5-
#include "iimageformat.h"
65
#include "spimpl.h"
76

87
#include "asset.h"
@@ -29,22 +28,8 @@ class LIBSCRATCHCPP_EXPORT Costume : public Asset
2928
int rotationCenterY() const;
3029
void setRotationCenterY(int newRotationCenterY);
3130

32-
unsigned int width() const;
33-
unsigned int height() const;
34-
35-
double scale() const;
36-
void setScale(double scale);
37-
38-
bool mirrorHorizontally() const;
39-
void setMirrorHorizontally(bool mirror);
40-
41-
Rgb **bitmap() const;
42-
4331
Broadcast *broadcast();
4432

45-
protected:
46-
void processData(unsigned int size, void *data) override;
47-
4833
private:
4934
spimpl::unique_impl_ptr<CostumePrivate> impl;
5035
};

include/scratchcpp/igraphicseffect.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <string>
66

7-
#include "iimageformat.h"
7+
#include "global.h"
88

99
namespace libscratchcpp
1010
{

include/scratchcpp/iimageformat.h

Lines changed: 0 additions & 68 deletions
This file was deleted.

include/scratchcpp/iimageformatfactory.h

Lines changed: 0 additions & 24 deletions
This file was deleted.

include/scratchcpp/scratchconfiguration.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ namespace libscratchcpp
1111
{
1212

1313
class IExtension;
14-
class IImageFormat;
15-
class IImageFormatFactory;
1614
class IGraphicsEffect;
1715
class ScratchConfigurationPrivate;
1816

@@ -38,10 +36,6 @@ class LIBSCRATCHCPP_EXPORT ScratchConfiguration
3836
return nullptr;
3937
};
4038

41-
static void registerImageFormat(const std::string &name, std::shared_ptr<IImageFormatFactory> formatFactory);
42-
static void removeImageFormat(const std::string &name);
43-
static std::shared_ptr<IImageFormat> createImageFormat(const std::string &name);
44-
4539
static void registerGraphicsEffect(std::shared_ptr<IGraphicsEffect> effect);
4640
static void removeGraphicsEffect(const std::string &name);
4741
static IGraphicsEffect *getGraphicsEffect(const std::string &name);

src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ add_subdirectory(blocks)
1515
add_subdirectory(engine)
1616
add_subdirectory(internal)
1717
add_subdirectory(scratch)
18-
add_subdirectory(imageformats)

src/imageformats/CMakeLists.txt

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/imageformats/defaultimageformats.cpp

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/imageformats/jpeg/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)