1*22e87013SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*22e87013SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*22e87013SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*22e87013SAndrew Rist * distributed with this work for additional information 6*22e87013SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*22e87013SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*22e87013SAndrew Rist * "License"); you may not use this file except in compliance 9*22e87013SAndrew Rist * with the License. You may obtain a copy of the License at 10*22e87013SAndrew Rist * 11*22e87013SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*22e87013SAndrew Rist * 13*22e87013SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*22e87013SAndrew Rist * software distributed under the License is distributed on an 15*22e87013SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*22e87013SAndrew Rist * KIND, either express or implied. See the License for the 17*22e87013SAndrew Rist * specific language governing permissions and limitations 18*22e87013SAndrew Rist * under the License. 19*22e87013SAndrew Rist * 20*22e87013SAndrew Rist *************************************************************/ 21*22e87013SAndrew Rist 22*22e87013SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include <vcl/virdev.hxx> 26cdf0e10cSrcweir 27cdf0e10cSrcweir namespace PictReaderShape { 28cdf0e10cSrcweir /** draws a line from orig to dest knowing penSize 29cdf0e10cSrcweir 30cdf0e10cSrcweir Attention: in order to draw horizontal/vertical/small lines, this function can instead draw a rectangle or 31cdf0e10cSrcweir a polygon. In this case, we retrieve the line informations from VirtualDev ( GetLineColor ) 32cdf0e10cSrcweir and we use them as fill informations ( SetFillColor ). We restore after the VirtualDev state. 33cdf0e10cSrcweir 34cdf0e10cSrcweir This implies also that this function must be modified if we use real pattern to draw these primitives. 35cdf0e10cSrcweir */ 36cdf0e10cSrcweir void drawLine(VirtualDevice *dev, Point const &orig, Point const &dest, Size const &pSize); 37cdf0e10cSrcweir 38cdf0e10cSrcweir /** draws a rectangle knowing penSize */ 39cdf0e10cSrcweir void drawRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &rect, Size const &pSize); 40cdf0e10cSrcweir 41cdf0e10cSrcweir /** draws a polygon knowing penSize */ 42cdf0e10cSrcweir void drawPolygon(VirtualDevice *dev, bool drawFrame, Polygon const &rect, Size const &pSize); 43cdf0e10cSrcweir 44cdf0e10cSrcweir /** draws an ellipse knowing penSize */ 45cdf0e10cSrcweir void drawEllipse(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &pSize); 46cdf0e10cSrcweir 47cdf0e10cSrcweir /** draws a rounded rectangle knowing penSize 48cdf0e10cSrcweir \note ovalSize is two time the size of the corner 49cdf0e10cSrcweir */ 50cdf0e10cSrcweir void drawRoundRectangle(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, Size const &ovalS, Size const &pSize); 51cdf0e10cSrcweir 52cdf0e10cSrcweir /** draws an arc in a b2dpolygon knowing penSize 53cdf0e10cSrcweir \note - it supposes that angl1 < angl2 54cdf0e10cSrcweir */ 55cdf0e10cSrcweir void drawArc(VirtualDevice *dev, bool drawFrame, Rectangle const &orig, const double& angle1, const double& angle2, Size const &pSize); 56cdf0e10cSrcweir } 57