src/colors.cpp

changeset 471
fc58b67d445c
parent 455
c5d14d112034
child 493
16766ac1bbd9
equal deleted inserted replaced
470:e41b6e1e3299 471:fc58b67d445c
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 * =====================================================================
18 *
19 * colors.cpp: LDraw color management. LDConfig.ldr parsing is not here!
20 * TODO: Make LDColor more full-fledged, add support for direct colors.
21 * TODO: g_LDColors should probably be a map.
17 */ 22 */
18 23
19 #include "common.h" 24 #include "common.h"
20 #include "colors.h" 25 #include "colors.h"
21 #include "file.h" 26 #include "file.h"
32 LDColor* col; 37 LDColor* col;
33 print ("%1: initializing color information.\n", __func__); 38 print ("%1: initializing color information.\n", __func__);
34 39
35 // Always make sure there's 16 and 24 available. They're special like that. 40 // Always make sure there's 16 and 24 available. They're special like that.
36 col = new LDColor; 41 col = new LDColor;
42 col->faceColor =
37 col->hexcode = "#AAAAAA"; 43 col->hexcode = "#AAAAAA";
38 col->faceColor = col->hexcode;
39 col->edgeColor = Qt::black; 44 col->edgeColor = Qt::black;
40 g_LDColors[maincolor] = col; 45 g_LDColors[maincolor] = col;
41 46
42 col = new LDColor; 47 col = new LDColor;
48 col->faceColor =
49 col->edgeColor =
43 col->hexcode = "#000000"; 50 col->hexcode = "#000000";
44 col->edgeColor = col->faceColor = Qt::black;
45 g_LDColors[edgecolor] = col; 51 g_LDColors[edgecolor] = col;
46 52
47 parseLDConfig(); 53 parseLDConfig();
48 } 54 }
49 55

mercurial