Adding share functionality to Graphing Calculator (#601)
* Plumebd with data transfer * Getting mainpage to talk to getbitmap. moving share callbacks from mainpage to graphingcalculator * Trying to get bitmap from renderer. * work * Share worked * cleanups * Cleanups progressing * Share working, need loc for title string and user notification incase of a failure. Then add the equations key. * More cleanup, now using share icon image and resources for strings. Still need to do the graph equation key. * Change share to html based start. * Key working, with UL but going to try changing to table. * Fix a html formating error, generating a new UL for each equation. * Switched over to a table for equation key and have color block formating * Updates from PR feedback, using Graphing::IBitmap abstraction. * Update src/Calculator/Views/GraphingCalculator/GraphingCalculator.xaml.h Fixed Co-Authored-By: Pepe Rivera <joseartrivera@gmail.com> * PR Updates. * Add variables to the graph key. * PR Updates.
This commit is contained in:
committed by
Stephanie Anderl
parent
46f11c7c72
commit
c1efa3d3e3
11
src/GraphingInterfaces/IBitmap.h
Normal file
11
src/GraphingInterfaces/IBitmap.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace Graphing
|
||||
{
|
||||
struct IBitmap
|
||||
{
|
||||
virtual const std::vector<BYTE>& GetData() const = 0;
|
||||
};
|
||||
}
|
@@ -1,25 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "Common.h"
|
||||
#include "IBitmap.h"
|
||||
|
||||
struct ID2D1Factory;
|
||||
struct ID2D1RenderTarget;
|
||||
|
||||
namespace Graphing::Renderer
|
||||
{
|
||||
struct IGraphRenderer : public NonCopyable, public NonMoveable
|
||||
{
|
||||
virtual ~IGraphRenderer() = default;
|
||||
struct IGraphRenderer : public NonCopyable, public NonMoveable
|
||||
{
|
||||
virtual ~IGraphRenderer() = default;
|
||||
|
||||
virtual HRESULT SetGraphSize(unsigned int width, unsigned int height) = 0;
|
||||
virtual HRESULT SetDpi(float dpiX, float dpiY) = 0;
|
||||
virtual HRESULT SetGraphSize(unsigned int width, unsigned int height) = 0;
|
||||
virtual HRESULT SetDpi(float dpiX, float dpiY) = 0;
|
||||
|
||||
virtual HRESULT DrawD2D1(ID2D1Factory* pDirect2dFactory, ID2D1RenderTarget* pRenderTarget, bool& hasSomeMissingDataOut) = 0;
|
||||
virtual HRESULT GetClosePointData(float inScreenPointX, float inScreenPointY, int& formulaIdOut, float& xScreenPointOut, float& yScreenPointOut, float& xValueOut, float& yValueOut) = 0;
|
||||
|
||||
virtual HRESULT ScaleRange(double centerX, double centerY, double scale) = 0;
|
||||
virtual HRESULT ChangeRange(ChangeRangeAction action) = 0;
|
||||
virtual HRESULT MoveRangeByRatio(double ratioX, double ratioY) = 0;
|
||||
virtual HRESULT ResetRange() = 0;
|
||||
};
|
||||
virtual HRESULT DrawD2D1(ID2D1Factory* pDirect2dFactory, ID2D1RenderTarget* pRenderTarget, bool& hasSomeMissingDataOut) = 0;
|
||||
virtual HRESULT GetClosePointData(float inScreenPointX, float inScreenPointY, int& formulaIdOut, float& xScreenPointOut, float& yScreenPointOut, float& xValueOut, float& yValueOut) = 0;
|
||||
|
||||
virtual HRESULT ScaleRange(double centerX, double centerY, double scale) = 0;
|
||||
virtual HRESULT ChangeRange(ChangeRangeAction action) = 0;
|
||||
virtual HRESULT MoveRangeByRatio(double ratioX, double ratioY) = 0;
|
||||
virtual HRESULT ResetRange() = 0;
|
||||
|
||||
virtual HRESULT GetBitmap(std::shared_ptr<Graphing::IBitmap>& bitmapOut, bool& hasSomeMissingDataOut) = 0;
|
||||
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user