Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/tool/kis_resources_snapshot.cpp
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Line(s) | 78 | { | |||
---|---|---|---|---|---|
82 | } | 82 | } | ||
83 | m_d->bounds = bounds; | 83 | m_d->bounds = bounds; | ||
84 | m_d->currentFgColor = resourceManager->resource(KoCanvasResourceProvider::ForegroundColor).value<KoColor>(); | 84 | m_d->currentFgColor = resourceManager->resource(KoCanvasResourceProvider::ForegroundColor).value<KoColor>(); | ||
85 | m_d->currentBgColor = resourceManager->resource(KoCanvasResourceProvider::BackgroundColor).value<KoColor>(); | 85 | m_d->currentBgColor = resourceManager->resource(KoCanvasResourceProvider::BackgroundColor).value<KoColor>(); | ||
86 | m_d->currentPattern = resourceManager->resource(KisCanvasResourceProvider::CurrentPattern).value<KoPattern*>(); | 86 | m_d->currentPattern = resourceManager->resource(KisCanvasResourceProvider::CurrentPattern).value<KoPattern*>(); | ||
87 | m_d->currentGradient = resourceManager->resource(KisCanvasResourceProvider::CurrentGradient).value<KoAbstractGradient*>(); | 87 | m_d->currentGradient = resourceManager->resource(KisCanvasResourceProvider::CurrentGradient).value<KoAbstractGradient*>(); | ||
88 | 88 | | |||
89 | /** | 89 | /** | ||
90 | * We should deep-copy the preset, so that long-runnign actions | 90 | * We should deep-copy the preset, so that long-running actions | ||
91 | * will have correct brush parameters. Theoretically this cloniong | 91 | * will have correct brush parameters. Theoretically this cloning | ||
92 | * can be expensive, but according to measurements, it takes | 92 | * can be expensive, but according to measurements, it takes | ||
93 | * something like 0.1 ms for an average preset. | 93 | * something like 0.1 ms for an average preset. | ||
94 | */ | 94 | */ | ||
95 | KisPaintOpPresetSP p = resourceManager->resource(KisCanvasResourceProvider::CurrentPaintOpPreset).value<KisPaintOpPresetSP>(); | 95 | KisPaintOpPresetSP p = resourceManager->resource(KisCanvasResourceProvider::CurrentPaintOpPreset).value<KisPaintOpPresetSP>(); | ||
96 | if (p) { | 96 | if (p) { | ||
97 | m_d->currentPaintOpPreset = resourceManager->resource(KisCanvasResourceProvider::CurrentPaintOpPreset).value<KisPaintOpPresetSP>()->clone(); | 97 | m_d->currentPaintOpPreset = resourceManager->resource(KisCanvasResourceProvider::CurrentPaintOpPreset).value<KisPaintOpPresetSP>()->clone(); | ||
98 | } | 98 | } | ||
99 | 99 | | |||
▲ Show 20 Lines • Show All 316 Lines • Show Last 20 Lines |