cristy | bd4fb6e | 2011-10-26 13:10:01 +0000 | [diff] [blame^] | 1 | /* |
| 2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 3 | % % |
| 4 | % % |
| 5 | % % |
| 6 | % PPPP AAA N N GGGG OOO % |
| 7 | % P P A A NN N G O O % |
| 8 | % PPPP AAAAA N N N G GGG O O % |
| 9 | % P M A A N NN G G O O % |
| 10 | % P A A N N GGGG OOO % |
| 11 | % % |
| 12 | % % |
| 13 | % Read Pango Markup Language Format % |
| 14 | % % |
| 15 | % Software Design % |
| 16 | % John Cristy % |
| 17 | % March 2012 % |
| 18 | % % |
| 19 | % % |
| 20 | % Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization % |
| 21 | % dedicated to making software imaging solutions freely available. % |
| 22 | % % |
| 23 | % You may not use this file except in compliance with the License. You may % |
| 24 | % obtain a copy of the License at % |
| 25 | % % |
| 26 | % http://www.imagemagick.org/script/license.php % |
| 27 | % % |
| 28 | % Unless required by applicable law or agreed to in writing, software % |
| 29 | % distributed under the License is distributed on an "AS IS" BASIS, % |
| 30 | % WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. % |
| 31 | % See the License for the specific language governing permissions and % |
| 32 | % limitations under the License. % |
| 33 | % % |
| 34 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 35 | % |
| 36 | % |
| 37 | */ |
| 38 | |
| 39 | /* |
| 40 | Include declarations. |
| 41 | */ |
| 42 | #include "MagickCore/studio.h" |
| 43 | #include "MagickCore/blob.h" |
| 44 | #include "MagickCore/blob-private.h" |
| 45 | #include "MagickCore/client.h" |
| 46 | #include "MagickCore/display.h" |
| 47 | #include "MagickCore/exception.h" |
| 48 | #include "MagickCore/exception-private.h" |
| 49 | #include "MagickCore/image.h" |
| 50 | #include "MagickCore/image-private.h" |
| 51 | #include "MagickCore/list.h" |
| 52 | #include "MagickCore/magick.h" |
| 53 | #include "MagickCore/monitor.h" |
| 54 | #include "MagickCore/monitor-private.h" |
| 55 | #include "MagickCore/memory_.h" |
| 56 | #include "MagickCore/option.h" |
| 57 | #include "MagickCore/pixel-accessor.h" |
| 58 | #include "MagickCore/quantum-private.h" |
| 59 | #include "MagickCore/static.h" |
| 60 | #include "MagickCore/string_.h" |
| 61 | #include "MagickCore/module.h" |
| 62 | #include "MagickCore/utility.h" |
| 63 | #include "MagickCore/xwindow.h" |
| 64 | #include "MagickCore/xwindow-private.h" |
| 65 | #if defined(MAGICKCORE_PANGO_DELEGATE) |
| 66 | #include <pango/pango.h> |
| 67 | #endif |
| 68 | |
| 69 | /* |
| 70 | Forward declarations. |
| 71 | */ |
| 72 | #if defined(MAGICKCORE_PANGO_DELEGATE) |
| 73 | static MagickBooleanType |
| 74 | WritePANGOImage(const ImageInfo *,Image *); |
| 75 | #endif |
| 76 | |
| 77 | #if defined(MAGICKCORE_PANGO_DELEGATE) |
| 78 | /* |
| 79 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 80 | % % |
| 81 | % % |
| 82 | % % |
| 83 | % R e a d P A N G O I m a g e % |
| 84 | % % |
| 85 | % % |
| 86 | % % |
| 87 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 88 | % |
| 89 | % ReadPANGOImage() reads an image in the Pango Markup Language Format. |
| 90 | % |
| 91 | % The format of the ReadPANGOImage method is: |
| 92 | % |
| 93 | % Image *ReadPANGOImage(const ImageInfo *image_info, |
| 94 | % ExceptionInfo *exception) |
| 95 | % |
| 96 | % A description of each parameter follows: |
| 97 | % |
| 98 | % o image_info: the image info. |
| 99 | % |
| 100 | % o exception: return any errors or warnings in this structure. |
| 101 | % |
| 102 | */ |
| 103 | static Image *ReadPANGOImage(const ImageInfo *image_info, |
| 104 | ExceptionInfo *exception) |
| 105 | { |
| 106 | return((Image *) NULL); |
| 107 | } |
| 108 | #endif |
| 109 | |
| 110 | /* |
| 111 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 112 | % % |
| 113 | % % |
| 114 | % % |
| 115 | % R e g i s t e r P A N G O I m a g e % |
| 116 | % % |
| 117 | % % |
| 118 | % % |
| 119 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 120 | % |
| 121 | % RegisterPANGOImage() adds attributes for the Pango Markup Language format to |
| 122 | % the list of supported formats. The attributes include the image format |
| 123 | % tag, a method to read and/or write the format, whether the format |
| 124 | % supports the saving of more than one frame to the same file or blob, |
| 125 | % whether the format supports native in-memory I/O, and a brief |
| 126 | % description of the format. |
| 127 | % |
| 128 | % The format of the RegisterPANGOImage method is: |
| 129 | % |
| 130 | % size_t RegisterPANGOImage(void) |
| 131 | % |
| 132 | */ |
| 133 | ModuleExport size_t RegisterPANGOImage(void) |
| 134 | { |
| 135 | MagickInfo |
| 136 | *entry; |
| 137 | |
| 138 | entry=SetMagickInfo("PANGO"); |
| 139 | #if defined(MAGICKCORE_PANGO_DELEGATE) |
| 140 | entry->decoder=(DecodeImageHandler *) ReadPANGOImage; |
| 141 | #endif |
| 142 | entry->description=ConstantString("Pango Markup Language"); |
| 143 | entry->adjoin=MagickFalse; |
| 144 | entry->module=ConstantString("PANGO"); |
| 145 | (void) RegisterMagickInfo(entry); |
| 146 | return(MagickImageCoderSignature); |
| 147 | } |
| 148 | |
| 149 | /* |
| 150 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 151 | % % |
| 152 | % % |
| 153 | % % |
| 154 | % U n r e g i s t e r P A N G O I m a g e % |
| 155 | % % |
| 156 | % % |
| 157 | % % |
| 158 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 159 | % |
| 160 | % UnregisterPANGOImage() removes format registrations made by the Pango module |
| 161 | % from the list of supported formats. |
| 162 | % |
| 163 | % The format of the UnregisterPANGOImage method is: |
| 164 | % |
| 165 | % UnregisterPANGOImage(void) |
| 166 | % |
| 167 | */ |
| 168 | ModuleExport void UnregisterPANGOImage(void) |
| 169 | { |
| 170 | (void) UnregisterMagickInfo("PANGO"); |
| 171 | } |