mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
--User changes
-Double clicking on width or height spinner resizes both, but scales to the one double clicked. --Bug fixes -Show grid setting was not being preserved during program run, only on close. -Zooming with the mouse wheel was broken for images whose size is greater than the screen area.
This commit is contained in:
parent
264aa8c454
commit
235381b4b9
@ -6,7 +6,7 @@
|
||||
<ProductVersion>3.7</ProductVersion>
|
||||
<ProjectGuid>{c8096c47-e358-438c-a520-146d46b0637d}</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>Fractorium_1.0.0.10</OutputName>
|
||||
<OutputName>Fractorium_1.0.0.11</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?define ProductVersion="1.0.0.10" ?>
|
||||
<?define ProductVersion="1.0.0.11" ?>
|
||||
<?define ProductName="Fractorium $(var.ProductVersion) ($(var.GpuType))" ?>
|
||||
<?define UpgradeCode="{4714cd15-bfba-44f6-8059-9e1466ebfa6e}"?>
|
||||
<?define Manufacturer="Fractorium"?>
|
||||
@ -13,7 +13,7 @@
|
||||
<!--
|
||||
Change this for every release.
|
||||
-->
|
||||
<?define ProductCode="{0F26C619-C6EA-439A-ACB7-EFB6401DA47E}"?>
|
||||
<?define ProductCode="{0F7914AA-B53C-414F-B5A0-1DC3C205499C}"?>
|
||||
|
||||
<Product Id="$(var.ProductCode)" Name="$(var.ProductName)" Language="1033" Version="$(var.ProductVersion)" Manufacturer="$(var.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
|
||||
<Package
|
||||
|
Binary file not shown.
@ -49,8 +49,8 @@
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 0, 0, 10
|
||||
PRODUCTVERSION 1, 0, 0, 10
|
||||
FILEVERSION 1, 0, 0, 11
|
||||
PRODUCTVERSION 1, 0, 0, 11
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,12 +67,12 @@
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open Source"
|
||||
VALUE "FileDescription", "Renders fractal flames as animations with motion blur"
|
||||
VALUE "FileVersion", "1.0.0.10"
|
||||
VALUE "FileVersion", "1.0.0.11"
|
||||
VALUE "InternalName", "EmberAnimate.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2017, GPL v3"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2018, GPL v3"
|
||||
VALUE "OriginalFilename", "EmberAnimate.exe"
|
||||
VALUE "ProductName", "Ember Animate"
|
||||
VALUE "ProductVersion", "1.0.0.10"
|
||||
VALUE "ProductVersion", "1.0.0.11"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
Binary file not shown.
@ -49,8 +49,8 @@
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 0, 0, 10
|
||||
PRODUCTVERSION 1, 0, 0, 10
|
||||
FILEVERSION 1, 0, 0, 11
|
||||
PRODUCTVERSION 1, 0, 0, 11
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,12 +67,12 @@
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open Source"
|
||||
VALUE "FileDescription", "Manipulates fractal flames parameter files"
|
||||
VALUE "FileVersion", "1.0.0.10"
|
||||
VALUE "FileVersion", "1.0.0.11"
|
||||
VALUE "InternalName", "EmberGenome.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2017, GPL v3"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2018, GPL v3"
|
||||
VALUE "OriginalFilename", "EmberGenome.exe"
|
||||
VALUE "ProductName", "Ember Genome"
|
||||
VALUE "ProductVersion", "1.0.0.10"
|
||||
VALUE "ProductVersion", "1.0.0.11"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
@ -49,8 +49,8 @@
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1, 0, 0, 10
|
||||
PRODUCTVERSION 1, 0, 0, 10
|
||||
FILEVERSION 1, 0, 0, 11
|
||||
PRODUCTVERSION 1, 0, 0, 11
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
@ -67,12 +67,12 @@
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Open Source"
|
||||
VALUE "FileDescription", "Renders fractal flames as single images"
|
||||
VALUE "FileVersion", "1.0.0.10"
|
||||
VALUE "FileVersion", "1.0.0.11"
|
||||
VALUE "InternalName", "EmberRender.exe"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2017, GPL v3"
|
||||
VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2018, GPL v3"
|
||||
VALUE "OriginalFilename", "EmberRender.exe"
|
||||
VALUE "ProductName", "Ember Render"
|
||||
VALUE "ProductVersion", "1.0.0.10"
|
||||
VALUE "ProductVersion", "1.0.0.11"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
Binary file not shown.
@ -37,7 +37,7 @@ static void sincos(float x, float* s, float* c)
|
||||
|
||||
namespace EmberNs
|
||||
{
|
||||
#define EMBER_VERSION "1.0.0.10"
|
||||
#define EMBER_VERSION "1.0.0.11"
|
||||
#define EPS6 T(1e-6)
|
||||
#define EPS std::numeric_limits<T>::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way.
|
||||
#define ISAAC_SIZE 4
|
||||
|
@ -58,7 +58,7 @@
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p align="center">Fractorium 1.0.0.10</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" text-decoration: underline; color:#0000ff;">fractorium.com</span></a><span style=" font-size:10pt;"><br/>Lead: Matt Feemster<br/>Contributors: Simon Detheridge, Michel Mastriani</span></p></body></html></string>
|
||||
<string><html><head/><body><p align="center">Fractorium 1.0.0.11</p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" text-decoration: underline; color:#0000ff;">fractorium.com</span></a><span style=" font-size:10pt;"><br/>Lead: Matt Feemster<br/>Contributors: Simon Detheridge, Michel Mastriani</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
@ -148,6 +148,7 @@ public:
|
||||
virtual void PaletteModeChanged(uint i) { }
|
||||
virtual void WidthChanged(uint i) { }
|
||||
virtual void HeightChanged(uint i) { }
|
||||
virtual void ResizeAndScale(int width, int height, eScaleType scaleType) { }
|
||||
virtual void CenterXChanged(double d) { }
|
||||
virtual void CenterYChanged(double d) { }
|
||||
virtual void ScaleChanged(double d) { }
|
||||
@ -413,6 +414,7 @@ public:
|
||||
virtual void PaletteModeChanged(uint i) override;
|
||||
virtual void WidthChanged(uint i) override;
|
||||
virtual void HeightChanged(uint i) override;
|
||||
virtual void ResizeAndScale(int width, int height, eScaleType scaleType) override;
|
||||
virtual void CenterXChanged(double d) override;
|
||||
virtual void CenterYChanged(double d) override;
|
||||
virtual void ScaleChanged(double d) override;
|
||||
|
@ -56,6 +56,16 @@ void Fractorium::InitParamsUI()
|
||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_PitchSpin, spinHeight, -dmax, dmax, 1, SIGNAL(valueChanged(double)), SLOT(OnPitchChanged(double)), true, 0, 45, 0);
|
||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_YawSpin, spinHeight, -dmax, dmax, 1, SIGNAL(valueChanged(double)), SLOT(OnYawChanged(double)), true, 0, 45, 0);
|
||||
SetupSpinner<DoubleSpinBox, double>(table, this, row, 1, m_DepthBlurSpin, spinHeight, -dmax, dmax, 0.01, SIGNAL(valueChanged(double)), SLOT(OnDepthBlurChanged(double)), true, 0, 1, 0);
|
||||
m_WidthSpin->m_DoubleClickNonZeroEvent = [&](SpinBox * sb, int val)
|
||||
{
|
||||
m_Controller->ResizeAndScale(val, m_HeightSpin->DoubleClickNonZero(), eScaleType::SCALE_WIDTH);
|
||||
m_HeightSpin->SetValueStealth(m_HeightSpin->DoubleClickNonZero());
|
||||
};
|
||||
m_HeightSpin->m_DoubleClickNonZeroEvent = [&](SpinBox * sb, int val)
|
||||
{
|
||||
m_Controller->ResizeAndScale(m_WidthSpin->DoubleClickNonZero(), val, eScaleType::SCALE_HEIGHT);
|
||||
m_WidthSpin->SetValueStealth(m_WidthSpin->DoubleClickNonZero());
|
||||
};
|
||||
//Set w/h max values.
|
||||
m_CenterXSpin->setDecimals(3);
|
||||
m_CenterYSpin->setDecimals(3);
|
||||
@ -252,10 +262,11 @@ void Fractorium::OnPaletteModeComboCurrentIndexChanged(int index) { m_Controller
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Placeholder, do nothing.
|
||||
/// Dimensions are set automatically to match the dimensions of GLWidget.
|
||||
/// Set the width of the ember in pixels to the passed in value.
|
||||
/// Called when the width spinner is changed in a manner other than double clicking.
|
||||
/// Resets the rendering process.
|
||||
/// </summary>
|
||||
/// <param name="d">Ignored</param>
|
||||
/// <param name="i">The width value in pixels to set</param>
|
||||
template <typename T> void FractoriumEmberController<T>::WidthChanged(uint i)
|
||||
{
|
||||
UpdateAll([&](Ember<T>& ember, bool isMain)
|
||||
@ -263,13 +274,15 @@ template <typename T> void FractoriumEmberController<T>::WidthChanged(uint i)
|
||||
ember.m_FinalRasW = i;
|
||||
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
|
||||
}
|
||||
|
||||
void Fractorium::OnWidthChanged(int i) { m_Controller->WidthChanged(i); }
|
||||
|
||||
/// <summary>
|
||||
/// Placeholder, do nothing.
|
||||
/// Dimensions are set automatically to match the dimensions of GLWidget.
|
||||
/// Set the height of the ember in pixels to the passed in value.
|
||||
/// Called when the height spinner is changed in a manner other than double clicking.
|
||||
/// Resets the rendering process.
|
||||
/// </summary>
|
||||
/// <param name="d">Ignored</param>
|
||||
/// <param name="i">The height value in pixels to set</param>
|
||||
template <typename T> void FractoriumEmberController<T>::HeightChanged(uint i)
|
||||
{
|
||||
UpdateAll([&](Ember<T>& ember, bool isMain)
|
||||
@ -277,8 +290,31 @@ template <typename T> void FractoriumEmberController<T>::HeightChanged(uint i)
|
||||
ember.m_FinalRasH = i;
|
||||
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
|
||||
}
|
||||
|
||||
void Fractorium::OnHeightChanged(int i) { m_Controller->HeightChanged(i); }
|
||||
|
||||
/// <summary>
|
||||
/// Set the width and height of the ember in pixels to the passed in values.
|
||||
/// Called when either the width or height spinners are double clicked.
|
||||
/// Because this will change the scale value, the scale spinner gets a stealth update.
|
||||
/// For this reason, the affine scales are reset, even though they are not when doing a manual
|
||||
/// height or width adjustment.
|
||||
/// Resets the rendering process.
|
||||
/// </summary>
|
||||
/// <param name="width">The width value in pixels to set</param>
|
||||
/// <param name="height">The height value in pixels to set</param>
|
||||
/// <param name="scaleType">The height value in pixels to set</param>
|
||||
template <typename T>
|
||||
void FractoriumEmberController<T>::ResizeAndScale(int width, int height, eScaleType scaleType)
|
||||
{
|
||||
UpdateAll([&](Ember<T>& ember, bool isMain)
|
||||
{
|
||||
m_Ember.SetSizeAndAdjustScale(width, height, false, scaleType);
|
||||
}, true, eProcessAction::FULL_RENDER, m_Fractorium->ApplyAll());
|
||||
m_Fractorium->m_ScaleSpin->SetValueStealth(m_Ember.m_PixelsPerUnit);
|
||||
m_Fractorium->OnActionResetScale(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the x offset applied to the center of the image.
|
||||
/// Resets the rendering process.
|
||||
|
@ -154,6 +154,7 @@ void Fractorium::OnActionDrawImage(bool checked)
|
||||
/// <param name="checked">Check state, show grid if true, else hide.</param>
|
||||
void Fractorium::OnActionDrawGrid(bool checked)
|
||||
{
|
||||
m_Settings->ShowGrid(checked);
|
||||
ui.GLDisplay->update();
|
||||
}
|
||||
|
||||
|
@ -1077,7 +1077,10 @@ void GLEmberController<T>::Wheel(QWheelEvent* e)
|
||||
void GLWidget::wheelEvent(QWheelEvent* e)
|
||||
{
|
||||
if (auto controller = GLController())
|
||||
{
|
||||
controller->Wheel(e);
|
||||
e->accept();//Prevents it from being sent to the main scroll bars. Scrolling should only affect the scale parameter and affine display zooming.
|
||||
}
|
||||
|
||||
//Do not call QOpenGLWidget::wheelEvent(e) because this should only affect the scale and not the position of the scroll bars.
|
||||
}
|
||||
|
@ -66,6 +66,11 @@ void SpinBox::DoubleClickLowVal(int val)
|
||||
m_DoubleClickLowVal = val;
|
||||
}
|
||||
|
||||
int SpinBox::DoubleClickLowVal()
|
||||
{
|
||||
return m_DoubleClickLowVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value to be used when the user double clicks the spinner while
|
||||
/// it contains zero.
|
||||
@ -76,6 +81,11 @@ void SpinBox::DoubleClickZero(int val)
|
||||
m_DoubleClickZero = val;
|
||||
}
|
||||
|
||||
int SpinBox::DoubleClickZero()
|
||||
{
|
||||
return m_DoubleClickZero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the value to be used when the user double clicks the spinner while
|
||||
/// it contains a non-zero value.
|
||||
@ -86,6 +96,11 @@ void SpinBox::DoubleClickNonZero(int val)
|
||||
m_DoubleClickNonZero = val;
|
||||
}
|
||||
|
||||
int SpinBox::DoubleClickNonZero()
|
||||
{
|
||||
return m_DoubleClickNonZero;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the small step to be used when the user holds down shift while scrolling.
|
||||
/// The default is step / 10, so use this if something else is needed.
|
||||
@ -175,11 +190,17 @@ bool SpinBox::eventFilter(QObject* o, QEvent* e)
|
||||
(m_Settings->ToggleType() && me->type() == QMouseEvent::MouseButtonRelease && me->button() == Qt::RightButton)))
|
||||
{
|
||||
if (IsClose(m_DoubleClickLowVal, value()))
|
||||
{
|
||||
m_DoubleClickZeroEvent(this, m_DoubleClickZero);
|
||||
setValue(m_DoubleClickZero);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_DoubleClickNonZeroEvent(this, m_DoubleClickNonZero);
|
||||
setValue(m_DoubleClickNonZero);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (e->type() == QEvent::Wheel)
|
||||
|
@ -23,10 +23,15 @@ public:
|
||||
void SetValueStealth(size_t d);
|
||||
void DoubleClick(bool b);
|
||||
void DoubleClickLowVal(int val);
|
||||
int DoubleClickLowVal();
|
||||
void DoubleClickZero(int val);
|
||||
int DoubleClickZero();
|
||||
void DoubleClickNonZero(int val);
|
||||
int DoubleClickNonZero();
|
||||
void SmallStep(int step);
|
||||
QLineEdit* lineEdit();
|
||||
std::function<void(SpinBox*, int)> m_DoubleClickZeroEvent = [&](SpinBox*, int) {};
|
||||
std::function<void(SpinBox*, int)> m_DoubleClickNonZeroEvent = [&](SpinBox*, int) {};
|
||||
|
||||
public slots:
|
||||
void onSpinBoxValueChanged(int i);
|
||||
|
Loading…
Reference in New Issue
Block a user