Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

juce_graphics.cpp 5.4KB

9 years ago
8 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2015 - ROLI Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifdef JUCE_GRAPHICS_H_INCLUDED
  18. /* When you add this cpp file to your project, you mustn't include it in a file where you've
  19. already included any other headers - just put it inside a file on its own, possibly with your config
  20. flags preceding it, but don't include anything else. That also includes avoiding any automatic prefix
  21. header files that the compiler may be using.
  22. */
  23. #error "Incorrect use of JUCE cpp file"
  24. #endif
  25. #include "AppConfig.h"
  26. #define JUCE_CORE_INCLUDE_OBJC_HELPERS 1
  27. #define JUCE_CORE_INCLUDE_COM_SMART_PTR 1
  28. #define JUCE_CORE_INCLUDE_JNI_HELPERS 1
  29. #define JUCE_CORE_INCLUDE_NATIVE_HEADERS 1
  30. #define JUCE_GRAPHICS_INCLUDE_COREGRAPHICS_HELPERS 1
  31. #include "juce_graphics.h"
  32. //==============================================================================
  33. #if JUCE_MAC
  34. #import <QuartzCore/QuartzCore.h>
  35. #elif JUCE_WINDOWS
  36. // get rid of some warnings in Window's own headers
  37. #ifdef JUCE_MSVC
  38. #pragma warning (push)
  39. #pragma warning (disable : 4458)
  40. #endif
  41. #if JUCE_MINGW && JUCE_USE_DIRECTWRITE
  42. #warning "DirectWrite not currently implemented with mingw..."
  43. #undef JUCE_USE_DIRECTWRITE
  44. #endif
  45. #if JUCE_USE_DIRECTWRITE
  46. /* If you hit a compile error trying to include these files, you may need to update
  47. your version of the Windows SDK to the latest one. The DirectWrite and Direct2D
  48. headers are in the version 7 SDKs.
  49. */
  50. #include <d2d1.h>
  51. #include <dwrite.h>
  52. #endif
  53. #if JUCE_MINGW
  54. #include <malloc.h>
  55. #endif
  56. #ifdef JUCE_MSVC
  57. #pragma warning (pop)
  58. #endif
  59. #elif JUCE_IOS
  60. #import <QuartzCore/QuartzCore.h>
  61. #import <CoreText/CoreText.h>
  62. #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2
  63. #error "JUCE no longer supports targets earlier than iOS 3.2"
  64. #endif
  65. #elif JUCE_LINUX
  66. #ifndef JUCE_USE_FREETYPE
  67. #define JUCE_USE_FREETYPE 1
  68. #endif
  69. #endif
  70. #if JUCE_USE_FREETYPE
  71. #if JUCE_USE_FREETYPE_AMALGAMATED
  72. #include "native/freetype/FreeTypeAmalgam.h"
  73. #else
  74. #include <ft2build.h>
  75. #include FT_FREETYPE_H
  76. #endif
  77. #endif
  78. #undef SIZEOF
  79. #if (JUCE_MAC || JUCE_IOS) && USE_COREGRAPHICS_RENDERING && JUCE_USE_COREIMAGE_LOADER
  80. #define JUCE_USING_COREIMAGE_LOADER 1
  81. #else
  82. #define JUCE_USING_COREIMAGE_LOADER 0
  83. #endif
  84. //==============================================================================
  85. namespace juce
  86. {
  87. #include "colour/juce_Colour.cpp"
  88. #include "colour/juce_ColourGradient.cpp"
  89. #include "colour/juce_Colours.cpp"
  90. #include "colour/juce_FillType.cpp"
  91. #include "geometry/juce_AffineTransform.cpp"
  92. #include "geometry/juce_EdgeTable.cpp"
  93. #include "geometry/juce_Path.cpp"
  94. #include "geometry/juce_PathIterator.cpp"
  95. #include "geometry/juce_PathStrokeType.cpp"
  96. #include "placement/juce_RectanglePlacement.cpp"
  97. #include "contexts/juce_GraphicsContext.cpp"
  98. #include "contexts/juce_LowLevelGraphicsPostScriptRenderer.cpp"
  99. #include "contexts/juce_LowLevelGraphicsSoftwareRenderer.cpp"
  100. #include "images/juce_Image.cpp"
  101. #include "images/juce_ImageCache.cpp"
  102. #include "images/juce_ImageConvolutionKernel.cpp"
  103. #include "images/juce_ImageFileFormat.cpp"
  104. #include "image_formats/juce_GIFLoader.cpp"
  105. #include "image_formats/juce_JPEGLoader.cpp"
  106. #include "image_formats/juce_PNGLoader.cpp"
  107. #include "fonts/juce_AttributedString.cpp"
  108. #include "fonts/juce_Typeface.cpp"
  109. #include "fonts/juce_CustomTypeface.cpp"
  110. #include "fonts/juce_Font.cpp"
  111. #include "fonts/juce_GlyphArrangement.cpp"
  112. #include "fonts/juce_TextLayout.cpp"
  113. #include "effects/juce_DropShadowEffect.cpp"
  114. #include "effects/juce_GlowEffect.cpp"
  115. #if JUCE_USE_FREETYPE
  116. #include "native/juce_freetype_Fonts.cpp"
  117. #endif
  118. //==============================================================================
  119. #if JUCE_MAC || JUCE_IOS
  120. #include "native/juce_mac_Fonts.mm"
  121. #include "native/juce_mac_CoreGraphicsContext.mm"
  122. #elif JUCE_WINDOWS
  123. #include "native/juce_win32_DirectWriteTypeface.cpp"
  124. #include "native/juce_win32_DirectWriteTypeLayout.cpp"
  125. #include "native/juce_win32_Fonts.cpp"
  126. #if JUCE_DIRECT2D
  127. #include "native/juce_win32_Direct2DGraphicsContext.cpp"
  128. #endif
  129. #elif JUCE_LINUX
  130. #include "native/juce_linux_Fonts.cpp"
  131. #elif JUCE_ANDROID
  132. #include "native/juce_android_GraphicsContext.cpp"
  133. #include "native/juce_android_Fonts.cpp"
  134. #endif
  135. }
  136. //==============================================================================
  137. #if JUCE_USE_FREETYPE && JUCE_USE_FREETYPE_AMALGAMATED
  138. #undef PIXEL_MASK
  139. #undef ZLIB_VERSION
  140. #undef Z_ASCII
  141. #undef ZEXTERN
  142. #undef ZEXPORT
  143. extern "C"
  144. {
  145. #include "native/freetype/FreeTypeAmalgam.c"
  146. }
  147. #endif