2014-10-22 15:51:34 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2019-06-13 11:23:39 +00:00
|
|
|
* Copyright (C) 2013-2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2022-02-28 18:02:00 +00:00
|
|
|
* Copyright (C) 1992-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
2014-10-22 15:51:34 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
#ifndef DS_DATA_ITEM_H
|
|
|
|
#define DS_DATA_ITEM_H
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2013-08-02 13:57:24 +00:00
|
|
|
#include <math/vector2d.h>
|
2013-07-19 18:27:22 +00:00
|
|
|
#include <eda_text.h>
|
2018-01-29 08:39:13 +00:00
|
|
|
#include <bitmap_base.h>
|
2021-02-22 23:47:17 +00:00
|
|
|
#include "drawing_sheet/ds_draw_item.h"
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
class DS_DRAW_ITEM_TEXT; // Forward declaration
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-05-30 22:56:24 +00:00
|
|
|
#define TB_DEFAULT_TEXTSIZE 1.5 // default drawing sheet text size in mm
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2020-10-13 05:04:31 +00:00
|
|
|
namespace KIGFX
|
|
|
|
{
|
|
|
|
class VIEW;
|
|
|
|
}
|
|
|
|
|
2019-06-06 09:13:10 +00:00
|
|
|
/**
|
|
|
|
* A coordinate is relative to a page corner.
|
2020-12-21 23:42:21 +00:00
|
|
|
*
|
|
|
|
* Any of the 4 corners can be a reference. The default is the right bottom corner.
|
2019-06-06 09:13:10 +00:00
|
|
|
*/
|
2019-05-20 10:23:32 +00:00
|
|
|
enum CORNER_ANCHOR
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
RB_CORNER, // right bottom corner
|
|
|
|
RT_CORNER, // right top corner
|
|
|
|
LB_CORNER, // left bottom corner
|
|
|
|
LT_CORNER, // left top corner
|
|
|
|
};
|
|
|
|
|
2019-05-20 10:23:32 +00:00
|
|
|
enum PAGE_OPTION
|
|
|
|
{
|
|
|
|
ALL_PAGES,
|
|
|
|
FIRST_PAGE_ONLY,
|
|
|
|
SUBSEQUENT_PAGES
|
|
|
|
};
|
|
|
|
|
2019-06-06 09:13:10 +00:00
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* A coordinate point.
|
|
|
|
*
|
|
|
|
* The position is always relative to the corner anchor.
|
|
|
|
*
|
|
|
|
* @note The coordinate is from the anchor point to the opposite corner.
|
2019-06-06 09:13:10 +00:00
|
|
|
*/
|
2013-07-19 18:27:22 +00:00
|
|
|
class POINT_COORD
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
POINT_COORD() { m_Anchor = RB_CORNER; }
|
2019-05-20 10:23:32 +00:00
|
|
|
|
2022-01-19 23:31:07 +00:00
|
|
|
POINT_COORD( const VECTOR2D& aPos, enum CORNER_ANCHOR aAnchor = RB_CORNER )
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
m_Pos = aPos;
|
|
|
|
m_Anchor = aAnchor;
|
|
|
|
}
|
2020-12-21 23:42:21 +00:00
|
|
|
|
2022-01-19 23:31:07 +00:00
|
|
|
VECTOR2D m_Pos;
|
2020-12-21 23:42:21 +00:00
|
|
|
int m_Anchor;
|
2013-07-19 18:27:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2019-06-06 09:13:10 +00:00
|
|
|
/**
|
2021-02-22 23:47:17 +00:00
|
|
|
* Drawing sheet structure type definitions.
|
2020-12-21 23:42:21 +00:00
|
|
|
*
|
2019-06-06 09:13:10 +00:00
|
|
|
* Basic items are:
|
|
|
|
* * segment and rect (defined by 2 points)
|
|
|
|
* * text (defined by a coordinate), the text and its justifications
|
|
|
|
* * poly polygon defined by a coordinate, and a set of list of corners
|
|
|
|
* ( because we use it for logos, there are more than one polygon
|
|
|
|
* in this description
|
|
|
|
*/
|
2021-02-22 23:47:17 +00:00
|
|
|
class DS_DATA_ITEM
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-02-22 23:47:17 +00:00
|
|
|
enum DS_ITEM_TYPE {
|
|
|
|
DS_TEXT,
|
|
|
|
DS_SEGMENT,
|
|
|
|
DS_RECT,
|
|
|
|
DS_POLYPOLYGON,
|
|
|
|
DS_BITMAP
|
2013-07-19 18:27:22 +00:00
|
|
|
};
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_DATA_ITEM( DS_ITEM_TYPE aType );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
virtual ~DS_DATA_ITEM();
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
const std::vector<DS_DRAW_ITEM_BASE*>& GetDrawItems() const { return m_drawItems; }
|
2019-05-20 10:23:32 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
virtual void SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aView );
|
2019-05-20 10:23:32 +00:00
|
|
|
|
|
|
|
void SetStart( double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor = RB_CORNER )
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
m_Pos.m_Pos.x = aPosx;
|
|
|
|
m_Pos.m_Pos.y = aPosy;
|
|
|
|
m_Pos.m_Anchor = aAnchor;
|
|
|
|
}
|
|
|
|
|
2019-05-20 10:23:32 +00:00
|
|
|
void SetEnd( double aPosx, double aPosy, enum CORNER_ANCHOR aAnchor = RB_CORNER )
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
m_End.m_Pos.x = aPosx;
|
|
|
|
m_End.m_Pos.y = aPosy;
|
|
|
|
m_End.m_Anchor = aAnchor;
|
|
|
|
}
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_ITEM_TYPE GetType() const { return m_type; }
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2013-07-24 15:11:35 +00:00
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @return true if the item has a end point (segment; rect) of false (text, polygon).
|
2013-07-24 15:11:35 +00:00
|
|
|
*/
|
2019-05-20 10:23:32 +00:00
|
|
|
PAGE_OPTION GetPage1Option() const { return m_pageOption; }
|
|
|
|
void SetPage1Option( PAGE_OPTION aChoice ) { m_pageOption = aChoice; }
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
// Coordinate handling
|
2022-01-01 06:04:08 +00:00
|
|
|
const VECTOR2I GetStartPosUi( int ii = 0 ) const;
|
|
|
|
const VECTOR2I GetEndPosUi( int ii = 0 ) const;
|
2022-01-19 23:31:07 +00:00
|
|
|
const VECTOR2D GetStartPos( int ii = 0 ) const;
|
|
|
|
const VECTOR2D GetEndPos( int ii = 0 ) const;
|
2019-05-25 13:56:52 +00:00
|
|
|
|
|
|
|
virtual int GetPenSizeUi();
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Move item to a new position.
|
|
|
|
*
|
|
|
|
* @param aPosition the new position of item, in mm.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-19 23:31:07 +00:00
|
|
|
void MoveTo( const VECTOR2D& aPosition );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Move item to a new position.
|
|
|
|
*
|
|
|
|
* @param aPosition the new position of the starting point in graphic units.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-01 06:04:08 +00:00
|
|
|
void MoveToUi( const VECTOR2I& aPosition );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Move the starting point of the item to a new position.
|
|
|
|
*
|
|
|
|
* @param aPosition the new position of the starting point, in mm.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-19 23:31:07 +00:00
|
|
|
void MoveStartPointTo( const VECTOR2D& aPosition );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Move the starting point of the item to a new position.
|
|
|
|
*
|
|
|
|
* @param aPosition is the new position of item in graphic units.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-01 06:04:08 +00:00
|
|
|
void MoveStartPointToUi( const VECTOR2I& aPosition );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Move the ending point of the item to a new position.
|
|
|
|
*
|
|
|
|
* This has meaning only for items defined by 2 points (segments and rectangles).
|
|
|
|
*
|
|
|
|
* @param aPosition is the new position of the ending point, in mm.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-19 23:31:07 +00:00
|
|
|
void MoveEndPointTo( const VECTOR2D& aPosition );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Move the ending point of the item to a new position.
|
|
|
|
*
|
|
|
|
* This has meaning only for items defined by 2 points (segments and rectangles).
|
|
|
|
*
|
|
|
|
* @param aPosition is the new position of the ending point in graphic units
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-01 06:04:08 +00:00
|
|
|
void MoveEndPointToUi( const VECTOR2I& aPosition );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @return true if the item is inside the rectangle defined by the 4 corners, false otherwise.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
|
|
|
virtual bool IsInsidePage( int ii ) const;
|
|
|
|
|
|
|
|
const wxString GetClassName() const;
|
|
|
|
|
2021-05-30 22:56:24 +00:00
|
|
|
wxString m_Name; // a name used in drawing sheet editor to identify items
|
|
|
|
wxString m_Info; // a comment, only useful in drawing sheet editor
|
2020-12-21 23:42:21 +00:00
|
|
|
POINT_COORD m_Pos;
|
|
|
|
POINT_COORD m_End;
|
|
|
|
double m_LineWidth;
|
2021-05-30 22:56:24 +00:00
|
|
|
int m_RepeatCount; // repeat count for duplicate items
|
2022-01-19 23:31:07 +00:00
|
|
|
VECTOR2D m_IncrementVector; // for duplicate items: move vector for position increment
|
2020-12-21 23:42:21 +00:00
|
|
|
int m_IncrementLabel;
|
2021-06-08 17:47:06 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
DS_ITEM_TYPE m_type;
|
|
|
|
PAGE_OPTION m_pageOption;
|
|
|
|
|
|
|
|
std::vector<DS_DRAW_ITEM_BASE*> m_drawItems;
|
2020-12-21 23:42:21 +00:00
|
|
|
};
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
class DS_DATA_ITEM_POLYGONS : public DS_DATA_ITEM
|
2020-12-21 23:42:21 +00:00
|
|
|
{
|
2013-07-19 18:27:22 +00:00
|
|
|
public:
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_DATA_ITEM_POLYGONS( );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
void SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aView ) override;
|
2019-05-20 10:23:32 +00:00
|
|
|
|
2019-05-25 13:56:52 +00:00
|
|
|
virtual int GetPenSizeUi() override;
|
2013-07-24 15:11:35 +00:00
|
|
|
|
2013-07-19 18:27:22 +00:00
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Add a corner in corner list.
|
|
|
|
*
|
|
|
|
* @param aCorner is the item to append.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-19 23:31:07 +00:00
|
|
|
void AppendCorner( const VECTOR2D& aCorner )
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
m_Corners.push_back( aCorner );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2021-06-08 17:47:06 +00:00
|
|
|
* Close the current contour, by storing the index of the last corner of the current
|
2020-12-21 23:42:21 +00:00
|
|
|
* polygon in m_polyIndexEnd.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
|
|
|
void CloseContour()
|
|
|
|
{
|
|
|
|
m_polyIndexEnd.push_back( m_Corners.size() -1 );
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @return the count of contours in the poly polygon.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
|
|
|
int GetPolyCount() const { return (int) m_polyIndexEnd.size(); }
|
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @param aContour is the index of the contour.
|
|
|
|
* @return the index of the first corner of the contour \a aCountour.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2021-06-08 17:47:06 +00:00
|
|
|
unsigned GetPolyIndexStart( unsigned aContour ) const
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
if( aContour == 0 )
|
|
|
|
return 0;
|
|
|
|
else
|
|
|
|
return m_polyIndexEnd[aContour-1] + 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @param aContour is the index of the contour.
|
|
|
|
* @return the index of the last corner of the contour \a aCountour.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2021-06-08 17:47:06 +00:00
|
|
|
unsigned GetPolyIndexEnd( unsigned aContour ) const
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
return m_polyIndexEnd[aContour];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @return the coordinate (in mm) of the corner \a aIdx and the repeated item \a aRepeat
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-16 21:15:20 +00:00
|
|
|
const VECTOR2D GetCornerPosition( unsigned aIdx, int aRepeat = 0 ) const;
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* @return the coordinate (in draw/plot units) of the corner \a aIdx and the repeated
|
|
|
|
* item \a aRepeat
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
2022-01-01 06:04:08 +00:00
|
|
|
const VECTOR2I GetCornerPositionUi( unsigned aIdx, int aRepeat = 0 ) const;
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Calculate the bounding box of the set polygons.
|
2013-07-19 18:27:22 +00:00
|
|
|
*/
|
|
|
|
void SetBoundingBox();
|
|
|
|
|
2016-09-24 18:53:15 +00:00
|
|
|
bool IsInsidePage( int ii ) const override;
|
2020-12-21 23:42:21 +00:00
|
|
|
|
2022-01-16 21:15:20 +00:00
|
|
|
EDA_ANGLE m_Orient; // Orientation
|
|
|
|
std::vector<VECTOR2D> m_Corners; // corner list
|
2020-12-21 23:42:21 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<unsigned> m_polyIndexEnd; // index of the last point of each polygon
|
2022-01-16 21:15:20 +00:00
|
|
|
VECTOR2D m_minCoord; // min coord of corners, relative to m_Pos
|
|
|
|
VECTOR2D m_maxCoord; // max coord of corners, relative to m_Pos
|
2013-07-19 18:27:22 +00:00
|
|
|
};
|
|
|
|
|
2014-01-18 09:07:05 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
class DS_DATA_ITEM_TEXT : public DS_DATA_ITEM
|
2013-07-19 18:27:22 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_DATA_ITEM_TEXT( const wxString& aTextBase );
|
2013-07-19 18:27:22 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
void SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aView ) override;
|
2019-05-20 10:23:32 +00:00
|
|
|
|
2019-05-25 13:56:52 +00:00
|
|
|
virtual int GetPenSizeUi() override;
|
2013-07-19 18:27:22 +00:00
|
|
|
|
|
|
|
/**
|
2021-06-09 19:32:58 +00:00
|
|
|
* Try to build text which is an increment of m_TextBase
|
2013-07-19 18:27:22 +00:00
|
|
|
* has meaning only if m_TextBase is a basic text (one char)
|
|
|
|
* If the basic char is a digit, build a number
|
2020-12-21 23:42:21 +00:00
|
|
|
* If the basic char is a letter, use the letter with ASCII code
|
2013-07-19 18:27:22 +00:00
|
|
|
* aIncr + (basic char ascc code)
|
|
|
|
* @param aIncr = the increment value
|
|
|
|
* return the incremented label in m_FullText
|
|
|
|
*/
|
|
|
|
void IncrementLabel( int aIncr );
|
|
|
|
|
|
|
|
/**
|
2020-12-21 23:42:21 +00:00
|
|
|
* Calculate m_ConstrainedTextSize from m_TextSize
|
2013-07-19 18:27:22 +00:00
|
|
|
* to keep the X size and the full Y size of the text
|
|
|
|
* smaller than m_BoundingBoxSize
|
|
|
|
* if m_BoundingBoxSize.x or m_BoundingBoxSize.y > 0
|
|
|
|
* if m_BoundingBoxSize.x or m_BoundingBoxSize.y == 0
|
|
|
|
* the corresponding text size is not constrained
|
|
|
|
*/
|
|
|
|
void SetConstrainedTextSize();
|
|
|
|
|
2020-12-21 23:42:21 +00:00
|
|
|
/**
|
|
|
|
* Replace the '\''n' sequence by EOL and the sequence '\''\' by only one '\'
|
2013-08-18 15:49:04 +00:00
|
|
|
* inside m_FullText
|
2020-12-21 23:42:21 +00:00
|
|
|
* @return true if the EOL symbol is found or is inserted (multiline text).
|
2013-08-18 15:49:04 +00:00
|
|
|
*/
|
|
|
|
bool ReplaceAntiSlashSequence();
|
2020-12-21 23:42:21 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
wxString m_TextBase; // The basic text, with format symbols
|
|
|
|
wxString m_FullText; // The expanded text, shown on screen
|
|
|
|
double m_Orient; // Orientation in degrees
|
2021-12-28 22:13:54 +00:00
|
|
|
GR_TEXT_H_ALIGN_T m_Hjustify;
|
|
|
|
GR_TEXT_V_ALIGN_T m_Vjustify;
|
2020-12-21 23:42:21 +00:00
|
|
|
bool m_Italic;
|
|
|
|
bool m_Bold;
|
2022-02-28 18:02:00 +00:00
|
|
|
KIFONT::FONT* m_Font;
|
2022-01-20 00:17:44 +00:00
|
|
|
VECTOR2D m_TextSize;
|
|
|
|
VECTOR2D m_BoundingBoxSize; // When not null, this is the max size of the
|
2020-12-21 23:42:21 +00:00
|
|
|
// full text. The text size will be modified
|
|
|
|
// to keep the full text inside this bound.
|
2022-01-20 00:17:44 +00:00
|
|
|
VECTOR2D m_ConstrainedTextSize; // Actual text size, if constrained by
|
2020-12-21 23:42:21 +00:00
|
|
|
// the m_BoundingBoxSize constraint
|
2013-07-19 18:27:22 +00:00
|
|
|
};
|
|
|
|
|
2014-01-18 09:07:05 +00:00
|
|
|
|
2013-10-18 17:38:03 +00:00
|
|
|
class BITMAP_BASE;
|
2020-11-29 10:49:02 +00:00
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
class DS_DATA_ITEM_BITMAP : public DS_DATA_ITEM
|
2013-10-18 17:38:03 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-02-22 23:47:17 +00:00
|
|
|
DS_DATA_ITEM_BITMAP( BITMAP_BASE* aImage ) :
|
|
|
|
DS_DATA_ITEM( DS_BITMAP )
|
2013-10-18 17:38:03 +00:00
|
|
|
{
|
|
|
|
m_ImageBitmap = aImage;
|
|
|
|
}
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
void SyncDrawItems( DS_DRAW_ITEM_LIST* aCollector, KIGFX::VIEW* aView ) override;
|
2019-05-20 10:23:32 +00:00
|
|
|
|
2013-10-19 10:29:54 +00:00
|
|
|
int GetPPI() const;
|
|
|
|
void SetPPI( int aBitmapPPI );
|
2020-12-21 23:42:21 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
BITMAP_BASE* m_ImageBitmap;
|
2013-10-18 17:38:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-02-22 23:47:17 +00:00
|
|
|
#endif // DS_DATA_ITEM_H
|