mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-06-30 21:36:33 -04:00
--User changes
-Add a palette editor. -Add support for reading .ugr/.gradient/.gradients palette files. -Allow toggling on spinners whose minimum value is not zero. -Allow toggling display of image, affines and grid. -Add new variations: cylinder2, circlesplit, tile_log, truchet_fill, waves2_radial. --Bug fixes -cpow2 was wrong. -Palettes with rapid changes in color would produce slightly different outputs from Apo/Chaotica. This was due to a long standing bug from flam3. -Use exec() on Apple and show() on all other OSes for dialog boxes. -Trying to render a sequence with no frames would crash. -Selecting multiple xforms and rotating them would produce the wrong rotation. -Better handling when parsing flames using different encoding, such as unicode and UTF-8. -Switching between SP/DP didn't reselect the selected flame in the Library tab. --Code changes -Make all types concerning palettes be floats, including PaletteTableWidgetItem. -PaletteTableWidgetItem is no longer templated because all palettes are float. -Include the source colors for user created gradients. -Change parallel_for() calls to work with very old versions of TBB which are lingering on some systems. -Split conditional out of accumulation loop on the CPU for better performance. -Vectorize summing when doing density filter for better performance. -Make all usage of palettes be of type float, double is pointless. -Allow palettes to reside in multiple folders, while ensuring only one of each name is added. -Refactor some palette path searching code. -Make ReadFile() throw and catch an exception if the file operation fails. -A little extra safety in foci and foci3D with a call to Zeps(). -Cast to (real_t) in the OpenCL string for the w variation, which was having trouble compiling on Mac. -Fixing missing comma between paths in InitPaletteList(). -Move Xml and PaletteList classes into cpp to shorten build times when working on them. -Remove default param values for IterOpenCLKernelCreator<T>::SharedDataIndexDefines in cpp file. -Change more NULL to nullptr.
This commit is contained in:
@ -9,7 +9,6 @@ void Fractorium::InitXformsAffineUI()
|
||||
int affinePrec = 6, spinHeight = 20;
|
||||
double affineStep = 0.01, affineMin = std::numeric_limits<double>::lowest(), affineMax = std::numeric_limits<double>::max();
|
||||
auto table = ui.PreAffineTable;
|
||||
connect(ui.LockAffineCheckBox, SIGNAL(stateChanged(int)), this, SLOT(OnLockAffineScaleCheckBoxStateChanged(int)), Qt::QueuedConnection);
|
||||
table->verticalHeader()->setVisible(true);//The designer continually clobbers these values, so must manually set them here.
|
||||
table->horizontalHeader()->setVisible(true);
|
||||
table->verticalHeader()->setSectionsClickable(true);
|
||||
@ -155,20 +154,29 @@ void Fractorium::InitXformsAffineUI()
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Toggle whether to lock the visual scale of the affine spinners.
|
||||
/// Called when the user checks LockAffineCheckBox.
|
||||
/// Set the scale used for drawing the affines to a default value.
|
||||
/// </summary>
|
||||
/// <param name="state">True if checked, else false.</param>
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::LockAffineScaleCheckBoxStateChanged(int state)
|
||||
void FractoriumEmberController<T>::InitLockedScale()
|
||||
{
|
||||
m_LockedScale = m_Ember.m_PixelsPerUnit;
|
||||
m_LockedScale = (T)std::min<size_t>(m_Ember.m_FinalRasW, m_Ember.m_FinalRasH) / 4.0;
|
||||
m_LockedX = m_Ember.m_CenterX;
|
||||
m_LockedY = m_Ember.m_CenterY;
|
||||
m_Fractorium->ui.GLDisplay->update();
|
||||
}
|
||||
|
||||
void Fractorium::OnLockAffineScaleCheckBoxStateChanged(int state) { m_Controller->LockAffineScaleCheckBoxStateChanged(state); }
|
||||
/// <summary>
|
||||
/// Multiply the scale used for drawing the affines by the passed in value.
|
||||
/// </summary>
|
||||
/// <param name="value">The value to scale by</param>
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::ChangeLockedScale(T value)
|
||||
{
|
||||
T min_size = 25.0;
|
||||
m_LockedScale *= value;
|
||||
|
||||
if (m_LockedScale < min_size)
|
||||
m_LockedScale = min_size;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the value needed to multiply the current scale by to get back to the locked scale.
|
||||
@ -177,10 +185,7 @@ void Fractorium::OnLockAffineScaleCheckBoxStateChanged(int state) { m_Controller
|
||||
template <typename T>
|
||||
T FractoriumEmberController<T>::AffineScaleCurrentToLocked()
|
||||
{
|
||||
if (m_Fractorium->ui.LockAffineCheckBox->isChecked())
|
||||
return LockedScale() / m_Ember.m_PixelsPerUnit;
|
||||
else
|
||||
return 1;
|
||||
return LockedScale() / m_Ember.m_PixelsPerUnit;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -190,10 +195,7 @@ T FractoriumEmberController<T>::AffineScaleCurrentToLocked()
|
||||
template <typename T>
|
||||
T FractoriumEmberController<T>::AffineScaleLockedToCurrent()
|
||||
{
|
||||
if (m_Fractorium->ui.LockAffineCheckBox->isChecked())
|
||||
return m_Ember.m_PixelsPerUnit / LockedScale();
|
||||
else
|
||||
return 1;
|
||||
return m_Ember.m_PixelsPerUnit / LockedScale();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -736,5 +738,5 @@ bool Fractorium::LocalPivot() { return ui.LocalPivotRadio->isChecked();
|
||||
template class FractoriumEmberController<float>;
|
||||
|
||||
#ifdef DO_DOUBLE
|
||||
template class FractoriumEmberController<double>;
|
||||
template class FractoriumEmberController<double>;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user