aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/quartz/ImageFactory.h
blob: 2874a9bba95cc026ce82dedf2796b906f5e043ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once
#include "Base.h"

#include <cru/platform/graphics/ImageFactory.h>

namespace cru::platform::graphics::quartz {
class QuartzImageFactory : public OsxQuartzResource,
                           public virtual IImageFactory {
 public:
  explicit QuartzImageFactory(IGraphicsFactory* graphics_factory);
  ~QuartzImageFactory() override;

 public:
  std::unique_ptr<IImage> DecodeFromStream(io::Stream* stream) override;
  void EncodeToStream(IImage* image, io::Stream* stream, ImageFormat format,
                      float quality) override;
  std::unique_ptr<IImage> CreateBitmap(int width, int height) override;
};
}  // namespace cru::platform::graphics::quartz