File indexing completed on 2024-04-21 04:02:02
0001 /* 0002 KBlackBox - A simple game inspired by an emacs module 0003 0004 SPDX-FileCopyrightText: 1999-2000 Robert Cimrman <cimrman3@students.zcu.cz> 0005 SPDX-FileCopyrightText: 2007 Nicolas Roffet <nicolas-kde@roffet.com> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 0011 0012 #ifndef KBBGRAPHICSITEMBORDER_H 0013 #define KBBGRAPHICSITEMBORDER_H 0014 0015 0016 0017 /** 0018 * @brief Any border element of the scalable graphic widget 0019 */ 0020 class KBBGraphicsItemBorder 0021 { 0022 public: 0023 /** 0024 * @brief Constructor 0025 */ 0026 KBBGraphicsItemBorder(int borderPosition, int columns, int rows, float offset); 0027 0028 void setSize(int borderPosition, int columns, int rows); 0029 0030 0031 protected: 0032 void centerCoordinate(int borderPosition, float ¢erX, float ¢erY, float offset); 0033 float centerX() const; 0034 float centerY() const; 0035 int rotationAngle(); 0036 void setBorderPosition(int borderPosition); 0037 0038 0039 int m_borderPosition; 0040 float m_centerX; 0041 float m_centerY; 0042 int m_columns; 0043 float m_offset; 0044 int m_rows; 0045 }; 0046 0047 #endif // KBBGRAPHICSITEMBORDER_H