0.4.0.7 Beta 07/26/2014

0.4.0.7 Beta 07/26/2014
--User Changes
Color code xforms like Apo does.
Change other aspects of xform color drawing.
Add option to invert the Y axis to both the options final render
dialogs.
Coordinate Y axis setting with preview renders.
Add option to show all xforms when dragging. Previously, only the
current one was shown.
Make final render dialog appear in the middle of the screen.
Immediately draw yellow selection dot on mouse down.

--Bug Fixes
Resize final render dialog vertically if it's taller than the 90% of the
desktop area.
This commit is contained in:
mfeemster
2014-07-26 12:03:51 -07:00
parent ed8850e3db
commit d9d676393c
34 changed files with 394 additions and 187 deletions

View File

@ -25,7 +25,7 @@ namespace EmberNs
extern void sincos(double x, double *s, double *c);
#endif
#define EMBER_VERSION "0.4.0.6"
#define EMBER_VERSION "0.4.0.7"
#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

View File

@ -13,6 +13,7 @@ Renderer<T, bucketT>::Renderer()
m_Abort = false;
m_LockAccum = false;
m_EarlyClip = false;
m_YAxisUp = false;
m_InsertPalette = false;
m_ReclaimOnResize = false;
m_SubBatchSize = 1024 * 10;
@ -1451,7 +1452,7 @@ eRenderStatus Renderer<T, bucketT>::AccumulatorToFinalImage(unsigned char* pixel
parallel_for((unsigned int)0, FinalRasH(), [&] (unsigned int j)
{
Color<bucketT> newBucket;
int pixelsRowStart = j * FinalRowSize();//Pull out of inner loop for optimization.
int pixelsRowStart = (m_YAxisUp ? ((FinalRasH() - j) - 1) : j) * FinalRowSize();//Pull out of inner loop for optimization.
unsigned int y = m_DensityFilterOffset + (j * Supersample());//Start at the beginning row of each super sample block.
unsigned short* p16;
@ -1755,6 +1756,24 @@ void Renderer<T, bucketT>::EarlyClip(bool earlyClip)
ChangeVal([&] { m_EarlyClip = earlyClip; }, FILTER_AND_ACCUM);
}
/// <summary>
/// Get whether the positive Y coordinate of the final output image is up.
/// Default: false.
/// </summary>
/// <returns>True if up, else false.</returns>
template <typename T, typename bucketT>
bool Renderer<T, bucketT>::YAxisUp() const { return m_YAxisUp; }
/// <summary>
/// Set whether the positive Y axis of the final output image is up.
/// </summary>
/// <param name="yup">True if the positive y axis is up, else false.</param>
template <typename T, typename bucketT>
void Renderer<T, bucketT>::YAxisUp(bool yup)
{
ChangeVal([&] { m_YAxisUp = yup; }, ACCUM_ONLY);
}
/// <summary>
/// Get whether to insert the palette as a block of colors in the final output image.
/// This is useful for debugging palette issues.

View File

@ -111,6 +111,8 @@ public:
virtual void ReclaimOnResize(bool reclaimOnResize) { }
virtual bool EarlyClip() const { return false; }
virtual void EarlyClip(bool earlyClip) { }
virtual bool YAxisUp() const { return false; }
virtual void YAxisUp(bool yup) { }
virtual void ThreadCount(unsigned int threads, const char* seedString = NULL) { }
virtual void Transparency(bool transparency) { }
virtual void InteractiveFilter(eInteractiveFilter filter) { }
@ -221,6 +223,9 @@ public:
virtual bool EarlyClip() const;
virtual void EarlyClip(bool earlyClip);
virtual bool YAxisUp() const;
virtual void YAxisUp(bool yup);
inline bool InsertPalette() const;
void InsertPalette(bool insertPalette);
@ -335,6 +340,7 @@ private:
protected:
bool m_EarlyClip;
bool m_YAxisUp;
bool m_Transparency;
unsigned int m_SuperRasW;
unsigned int m_SuperRasH;