File indexing completed on 2024-12-22 04:16:10
0001 /* 0002 * SPDX-FileCopyrightText: 2008 Lukas Tvrdy <lukast.dev@gmail.com> 0003 * SPDX-FileCopyrightText: 2010 José Luis Vergara <pentalis@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 #include "KisHatchingPreferencesData.h" 0008 0009 #include "kis_properties_configuration.h" 0010 0011 0012 const QString HATCHING_ANTIALIAS = "Hatching/bool_antialias"; 0013 const QString HATCHING_OPAQUE_BACKGROUND = "Hatching/bool_opaquebackground"; 0014 const QString HATCHING_SUBPIXEL_PRECISION = "Hatching/bool_subpixelprecision"; 0015 0016 0017 bool KisHatchingPreferencesData::read(const KisPropertiesConfiguration *setting) 0018 { 0019 useAntialias = setting->getBool(HATCHING_ANTIALIAS, false); 0020 useOpaqueBackground = setting->getBool(HATCHING_OPAQUE_BACKGROUND, false); 0021 useSubpixelPrecision = setting->getBool(HATCHING_SUBPIXEL_PRECISION, false); 0022 0023 return true; 0024 } 0025 0026 void KisHatchingPreferencesData::write(KisPropertiesConfiguration *setting) const 0027 { 0028 setting->setProperty(HATCHING_ANTIALIAS, useAntialias); 0029 setting->setProperty(HATCHING_OPAQUE_BACKGROUND, useOpaqueBackground); 0030 setting->setProperty(HATCHING_SUBPIXEL_PRECISION, useSubpixelPrecision); 0031 }