r18954 by fschmid - Added support for Open Raster Graphics (ORA)
scribus-commit
scribus-commit at lists.scribus.net
Wed Mar 26 21:06:39 UTC 2014
Author: fschmid
Date: Wed Mar 26 21:06:38 2014
New Revision: 18954
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18954
Log:
Added support for Open Raster Graphics (ORA)
Added:
trunk/Scribus/scribus/scimgdataloader_ora.cpp
trunk/Scribus/scribus/scimgdataloader_ora.h
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/scimage.cpp
trunk/Scribus/scribus/scpainter.cpp
trunk/Scribus/scribus/util_formats.cpp
trunk/Scribus/scribus/util_formats.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18954&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Wed Mar 26 21:06:38 2014
@@ -646,6 +646,7 @@
scimgdataloader.cpp
scimgdataloader_gimp.cpp
scimgdataloader_jpeg.cpp
+ scimgdataloader_ora.cpp
scimgdataloader_pdf.cpp
scimgdataloader_pgf.cpp
scimgdataloader_pict.cpp
Modified: trunk/Scribus/scribus/scimage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18954&path=/trunk/Scribus/scribus/scimage.cpp
==============================================================================
--- trunk/Scribus/scribus/scimage.cpp (original)
+++ trunk/Scribus/scribus/scimage.cpp Wed Mar 26 21:06:38 2014
@@ -16,6 +16,7 @@
#include "scimgdataloader_gmagick.h"
#endif
#include "scimgdataloader_jpeg.h"
+#include "scimgdataloader_ora.h"
#include "scimgdataloader_pict.h"
#include "scimgdataloader_ps.h"
#include "scimgdataloader_psd.h"
@@ -2246,17 +2247,11 @@
if (ext.isEmpty() || (!ext2.isEmpty() && (ext2 != ext)))
ext = ext2;
if (extensionIndicatesPDF(ext))
- {
pDataLoader.reset( new ScImgDataLoader_PDF() );
- }
else if (extensionIndicatesEPSorPS(ext))
- {
pDataLoader.reset( new ScImgDataLoader_PS() );
- }
else if (extensionIndicatesTIFF(ext))
- {
pDataLoader.reset( new ScImgDataLoader_TIFF() );
- }
else if (extensionIndicatesPSD(ext))
{
pDataLoader.reset( new ScImgDataLoader_PSD() );
@@ -2272,6 +2267,8 @@
pDataLoader.reset( new ScImgDataLoader_PICT() );
else if (ext == "wpg")
pDataLoader.reset( new ScImgDataLoader_WPG() );
+ else if (ext == "ora")
+ pDataLoader.reset( new ScImgDataLoader_ORA() );
#ifdef GMAGICK_FOUND
else if (fmtImg.contains(ext))
pDataLoader.reset( new ScImgDataLoader_QT() );
Modified: trunk/Scribus/scribus/scpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18954&path=/trunk/Scribus/scribus/scpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/scpainter.cpp (original)
+++ trunk/Scribus/scribus/scpainter.cpp Wed Mar 26 21:06:38 2014
@@ -533,6 +533,12 @@
cairo_set_operator(m_cr, CAIRO_OPERATOR_HSL_COLOR);
else if (blendMode == 15)
cairo_set_operator(m_cr, CAIRO_OPERATOR_HSL_LUMINOSITY);
+ else if (blendMode == 16)
+ cairo_set_operator(m_cr, CAIRO_OPERATOR_ADD);
+ else if (blendMode == 17)
+ cairo_set_operator(m_cr, CAIRO_OPERATOR_DEST_IN);
+ else if (blendMode == 18)
+ cairo_set_operator(m_cr, CAIRO_OPERATOR_DEST_OUT);
else
cairo_set_operator(m_cr, CAIRO_OPERATOR_OVER);
}
Modified: trunk/Scribus/scribus/util_formats.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18954&path=/trunk/Scribus/scribus/util_formats.cpp
==============================================================================
--- trunk/Scribus/scribus/util_formats.cpp (original)
+++ trunk/Scribus/scribus/util_formats.cpp Wed Mar 26 21:06:38 2014
@@ -34,6 +34,7 @@
m_fmts.insert(FormatsManager::CVG, QStringList() << "cvg");
m_fmts.insert(FormatsManager::WPG, QStringList() << "wpg");
m_fmts.insert(FormatsManager::BMP, QStringList() << "bmp");
+ m_fmts.insert(FormatsManager::ORA, QStringList() << "ora");
#ifdef GMAGICK_FOUND
m_fmts.insert(FormatsManager::GMAGICK, QStringList() << "xbm" << "tga" << "ptif" << "ppm" << "pnm" << "pgm" << "pcds" << "pcd" << "pbm" << "mng" << "ico" << "gif" << "fax" << "dpx" << "bmp" << "xcf");
#endif
@@ -58,6 +59,7 @@
m_fmtNames[FormatsManager::CVG] = QObject::tr("Calamus CVG File");
m_fmtNames[FormatsManager::WPG] = QObject::tr("Word Perfect WPG File");
m_fmtNames[FormatsManager::BMP] = QObject::tr("BMP");
+ m_fmtNames[FormatsManager::ORA] = QObject::tr("Open Raster Files");
#ifdef GMAGICK_FOUND
m_fmtNames[FormatsManager::GMAGICK] = QObject::tr("GraphicsMagick File");
#endif
@@ -82,6 +84,7 @@
m_fmtMimeTypes.insert(FormatsManager::CVG, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::WPG, QStringList() << "");
m_fmtMimeTypes.insert(FormatsManager::PCT, QStringList() << "");
+ m_fmtMimeTypes.insert(FormatsManager::ORA, QStringList() << "");
QMapIterator<int, QStringList> i(m_fmts);
while (i.hasNext())
Modified: trunk/Scribus/scribus/util_formats.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18954&path=/trunk/Scribus/scribus/util_formats.h
==============================================================================
--- trunk/Scribus/scribus/util_formats.h (original)
+++ trunk/Scribus/scribus/util_formats.h Wed Mar 26 21:06:38 2014
@@ -37,14 +37,14 @@
enum ScImageFormatType
{
- ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576,
+ ALLIMAGES = 1|2|4|8|16|32|64|128|256|512|1024|2048|4096|8192|16384|32768|524288|1048576|2097152,
#ifdef GMAGICK_FOUND
- IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576, // all Types suitable for Image Frames
+ IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|65536|1048576|2097152, // all Types suitable for Image Frames
#else
- IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576, // all Types suitable for Image Frames
+ IMAGESIMGFRAME = 1|2|4|16|32|64|128|256|512|262144|524288|1048576|2097152, // all Types suitable for Image Frames
#endif
VECTORIMAGES = 1|64|1024|2048|16384|32768|131072|262144, // All pure vector image types
- RASTORIMAGES = 2|4|8|32|128|256|512|65536|524288|1048576, // All pure rastor image types
+ RASTORIMAGES = 2|4|8|32|128|256|512|65536|524288|1048576|2097152, // All pure rastor image types
EPS = 1, // Encapsulated PostScript
GIF = 2, // GIF files
JPEG = 4, // JPEG
@@ -67,7 +67,8 @@
UNICONV = 131072, // UniConvertor
PCT = 262144, // Mac Pict
BMP = 524288, // BMP
- PGF = 1048576 // PGF
+ PGF = 1048576, // PGF
+ ORA = 2097152 // ORA
};
/*
More information about the scribus-commit
mailing list