Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ImageTargetFileQuartz.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010, The Barbarian Group
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without modification, are permitted provided that
6  the following conditions are met:
7 
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and
9  the following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
11  the following disclaimer in the documentation and/or other materials provided with the distribution.
12 
13  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
14  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
15  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
16  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
17  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
19  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20  POSSIBILITY OF SUCH DAMAGE.
21 */
22 
23 #pragma once
24 
25 #include "cinder/ImageIo.h"
27 
28 typedef struct CGImage *CGImageRef;
29 typedef struct CGImageDestination *CGImageDestinationRef;
30 typedef struct __CFDictionary * CFMutableDictionaryRef;
31 typedef uint32_t CGBitmapInfo;
32 
33 namespace cinder {
34 
35 typedef std::shared_ptr<class ImageTargetFileQuartz> ImageTargetFileQuartzRef;
36 
38  public:
39  static ImageTargetRef createRef( DataTargetRef dataTarget, ImageSourceRef imageSource, ImageTarget::Options options, const std::string &extensionData );
40 
41  virtual void finalize();
42 
43  static void registerSelf();
44 
45  protected:
46  ImageTargetFileQuartz( DataTargetRef dataTarget, ImageSourceRef imageSource, ImageTarget::Options options, const std::string &extensionData );
47 
49 
51  std::shared_ptr<__CFDictionary> mImageDestOptions;
52 
53  std::shared_ptr<uint8_t> mData;
54 };
55 
57 
58 } // namespace cinder
GLsizei const GLchar ** string
Definition: GLee.h:2427
::CGImageDestinationRef mImageDest
Definition: ImageTargetFileQuartz.h:50
struct CGImageDestination * CGImageDestinationRef
Definition: ImageTargetFileQuartz.h:29
std::shared_ptr< class ImageTarget > ImageTargetRef
Definition: ImageIo.h:42
Definition: ImageIo.h:159
std::shared_ptr< class ImageTargetFileQuartz > ImageTargetFileQuartzRef
Definition: ImageTargetFileQuartz.h:35
struct CGImage * CGImageRef
Definition: ImageTargetFileQuartz.h:28
void setupImageDestOptions(ImageTarget::Options options)
Definition: ImageTargetFileQuartz.cpp:100
std::shared_ptr< uint8_t > mData
Definition: ImageTargetFileQuartz.h:53
#define REGISTER_IMAGE_IO_FILE_HANDLER(TYPE)
Definition: ImageIo.h:289
ImageTargetFileQuartz(DataTargetRef dataTarget, ImageSourceRef imageSource, ImageTarget::Options options, const std::string &extensionData)
Definition: ImageTargetFileQuartz.cpp:117
struct __CFDictionary * CFMutableDictionaryRef
Definition: ImageTargetFileQuartz.h:30
static ImageTargetRef createRef(DataTargetRef dataTarget, ImageSourceRef imageSource, ImageTarget::Options options, const std::string &extensionData)
Definition: ImageTargetFileQuartz.cpp:79
std::shared_ptr< __CFDictionary > mImageDestOptions
Definition: ImageTargetFileQuartz.h:51
std::shared_ptr< class DataTarget > DataTargetRef
Definition: DataTarget.h:33
std::shared_ptr< class ImageSource > ImageSourceRef
Definition: Channel.h:33
virtual void finalize()
Definition: ImageTargetFileQuartz.cpp:148
Definition: ImageTargetFileQuartz.h:37
uint32_t CGBitmapInfo
Definition: ImageTargetFileQuartz.h:31
Definition: CinderCocoa.h:190
static void registerSelf()
Definition: ImageTargetFileQuartz.cpp:37