Kstars

skiphashlist.h
1/*
2 SPDX-FileCopyrightText: 2007 James B. Bowlin <bowlin@mindspring.com>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "linelist.h"
10
11/**
12 * @class SkipList
13 * Extends LineList by adding the skip hash to allow the same the data in a
14 * LineList to be drawn as a filled and an outlined polygon.
15 *
16 * NOTE: there is no skiplist.cpp file. This is all there is.
17 *
18 * @author James B. Bowlin
19 * @version 0.1
20 */
21class SkipHashList : public LineList
22{
23 public:
24 /**
25 * @short returns the entire skip hash.
26 * Used by the indexLines() routine so all the line segments in
27 * this SkipList can be indexed at once.
28 */
29 IndexHash *skipHash() { return &m_skip; }
30
31 /**
32 * @short instructs that the ith line segment should
33 * be skipped when drawn (and hence when indexed too).
34 */
35 void setSkip(int i) { m_skip[i] = true; }
36
37 /** @short returns the skip flag for the i-th line segment. */
38 bool skip(int i) { return m_skip.contains(i); }
39
40 private:
41 IndexHash m_skip;
42};
A simple data container used by LineListIndex.
Definition linelist.h:25
bool contains(const Key &key) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:38:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.