Back to index

scribus-ng  1.3.4.dfsg+svn20071115
pageitem_polygon.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 /***************************************************************************
00008                           pageitem.cpp  -  description
00009                              -------------------
00010     begin                : Sat Apr 7 2001
00011     copyright            : (C) 2001 by Franz Schmid
00012     email                : Franz.Schmid@altmuehlnet.de
00013  ***************************************************************************/
00014 
00015 /***************************************************************************
00016  *                                                                         *
00017  *   This program is free software; you can redistribute it and/or modify  *
00018  *   it under the terms of the GNU General Public License as published by  *
00019  *   the Free Software Foundation; either version 2 of the License, or     *
00020  *   (at your option) any later version.                                   *
00021  *                                                                         *
00022  ***************************************************************************/
00023 
00024 #include "pageitem_polygon.h"
00025 #include "pageitem_polygon.moc"
00026 #include <qpainter.h>
00027 #include <qpen.h>
00028 #include <qfont.h>
00029 #include <qregion.h>
00030 #include <qpoint.h>
00031 #include <qfileinfo.h>
00032 #include <qdrawutil.h>
00033 #include <qbitmap.h>
00034 #include <qregexp.h>
00035 #include <qmessagebox.h>
00036 #include <cmath>
00037 #include <cassert>
00038 
00039 #include "mpalette.h"
00040 #include "page.h"
00041 #include "pageitem.h"
00042 #include "prefsmanager.h"
00043 #include "scpaths.h"
00044 #include "scribus.h"
00045 #include "scribusstructs.h"
00046 #include "scribusdoc.h"
00047 
00048 #include "undomanager.h"
00049 #include "undostate.h"
00050 #include "scconfig.h"
00051 
00052 #include "util.h"
00053 
00054 using namespace std;
00055 
00056 PageItem_Polygon::PageItem_Polygon(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline)
00057        : PageItem(pa, PageItem::Polygon, x, y, w, h, w2, fill, outline)
00058 {
00059 }
00060 
00061 void PageItem_Polygon::DrawObj_Item(ScPainter *p, QRect /*e*/, double /*sc*/)
00062 {
00063        if (!m_Doc->RePos)
00064        {
00065               p->setupPolygon(&PoLine);
00066               p->fillPath();
00067        }
00068 }
00069