@@ -17,6 +17,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
1717#include " revpdfprinter.h"
1818
1919#include < cairo-pdf.h>
20+ #include < stdlib.h>
2021#include < stdio.h>
2122#include < float.h>
2223
@@ -214,8 +215,10 @@ bool MCPDFPrintingDevice::CanRenderPaint(const MCCustomPrinterPaint& p_paint)
214215 return p_paint.gradient .type == kMCCustomPrinterGradientLinear ||
215216 p_paint.gradient .type == kMCCustomPrinterGradientRadial ;
216217 break ;
218+ case kMCCustomPrinterPaintNone :
219+ default :
220+ return false ;
217221 }
218- return false ;
219222}
220223
221224bool MCPDFPrintingDevice::CanRenderImage (const MCCustomPrinterImage& p_image)
@@ -811,6 +814,9 @@ bool MCPDFPrintingDevice::draw_path(const MCCustomPrinterPath &p_path)
811814 t_points += 3 ;
812815 }
813816 break ;
817+ case kMCCustomPrinterPathEnd :
818+ /* Shouldn't ever be reached */
819+ abort ();
814820 }
815821 t_success = (m_status = cairo_status (m_context)) == CAIRO_STATUS_SUCCESS;
816822 }
@@ -869,6 +875,8 @@ bool MCPDFPrintingDevice::apply_paint(const MCCustomPrinterPaint &p_paint)
869875 case kMCCustomPrinterGradientRadial :
870876 t_paint_pattern = cairo_pattern_create_radial (0 , 0 , 0 , 0 , 0 , t_extent);
871877 break ;
878+ default :
879+ break ;
872880 }
873881 if (p_paint.gradient .repeat > 1 && !p_paint.gradient .wrap )
874882 {
@@ -960,6 +968,8 @@ bool MCPDFPrintingDevice::apply_paint(const MCCustomPrinterPaint &p_paint)
960968 init_matrix (t_transform, p_paint.gradient .transform );
961969 }
962970 break ;
971+ case kMCCustomPrinterPaintNone :
972+ break ;
963973 }
964974 if (t_paint_pattern != nil && t_success)
965975 {
0 commit comments