26 auto width = float(getWidth());
27 auto height = float(getHeight());
29 auto normalised = Rectangle<float>(rect.getX() / width, rect.getY() / height, rect.getWidth() / width,
30 rect.getHeight() / height);
38 g.drawLine(line, thickness);
43 g.drawFittedText(text, boundary.transformedBy(
m_transform).toNearestInt(), Justification::centredLeft, 1);
48 auto width = float(getWidth());
49 auto height = float(getHeight());
51 auto normalised = Line<float>(line.getStartX() / width, line.getStartY() / height, line.getEndX() / width,
52 line.getEndY() / height);
59 g.strokePath(path, PathStrokeType(thickness),
m_transform);
64 auto width = float(getWidth());
65 auto height = float(getHeight());
67 auto t = AffineTransform::scale(1.0f / width, 1.0f / height);
68 path.applyTransform(t);
74 bool fillAlphaChannelWithCurrentBrush)
76 g.drawImage(image, bounds.transformedBy(
m_transform), RectanglePlacement::stretchToFit,
77 fillAlphaChannelWithCurrentBrush);
87 g.drawEllipse(bounds.transformedBy(
m_transform), 1.f);
92 auto width = float(getWidth());
93 auto height = float(getHeight());
95 auto normalised = Rectangle<float>(bounds.getX() / width, bounds.getY() / height, bounds.getWidth() / width,
96 bounds.getHeight() / height);
105 auto height = float(getHeight());
106 auto width = float(getWidth());
109 AffineTransform::fromTargetPoints(xr.getStart(), yr.getStart(), 0.0f, 0.0f, xr.getEnd(), yr.getStart(),
110 width, 0.0f, xr.getStart(), yr.getEnd(), 0.0f, height);
118 m_hCenter = (xr.getStart() + xr.getEnd()) * 0.5f;
130 AffineTransform::fromTargetPoints(xr.getStart(), yr.getStart(), 0.0f, 0.0f, xr.getEnd(), yr.getStart(),
131 width, 0.0f, xr.getStart(), yr.getEnd(), 0.0f, height);
void drawZoomedEllipse(Graphics &g, const Rectangle< float > &bounds)
Definition ZoomableComponent.cpp:90
AffineTransform m_transform
Definition ZoomableComponent.h:73
void drawZoomedLine(Graphics &g, const Line< float > &line, float thickness) const
Definition ZoomableComponent.cpp:46
void drawZoomedRect(Graphics &g, const Rectangle< float > &rect) const
Definition ZoomableComponent.cpp:24
void SetTransformToFit(int width, int height)
Definition ZoomableComponent.cpp:123
void drawNormalisedZoomedRect(Graphics &g, const Rectangle< float > &rect) const
Definition ZoomableComponent.cpp:14
void drawNormalisedZoomedRectLine(Graphics &g, const Rectangle< float > &rect) const
Definition ZoomableComponent.cpp:19
float m_hCenter
Definition ZoomableComponent.h:68
void drawNormalisedZoomedImage(Graphics &g, Image &image, const Rectangle< float > &bounds, bool fillAlphaChannelWithCurrentBrush=false)
Definition ZoomableComponent.cpp:73
float m_hZoom
Definition ZoomableComponent.h:67
void drawNormalisedZoomedPath(Graphics &g, const Path &path, float thickness)
Definition ZoomableComponent.cpp:57
void drawNormalisedZoomedText(Graphics &g, String text, Rectangle< float > bounds) const
Definition ZoomableComponent.cpp:41
void drawNormalisedZoomedLine(Graphics &g, Line< float > line, float thickness) const
Definition ZoomableComponent.cpp:35
void setHorizontalZoomFromRange(const Range< float > xr)
Definition ZoomableComponent.cpp:116
void drawZoomedPath(Graphics &g, Path path, float thickness)
Definition ZoomableComponent.cpp:62
Range< float > getVerticalRange() const
Definition ZoomableComponent.cpp:9
void updateTransform()
Definition ZoomableComponent.cpp:101
Range< float > getHorizontalRange() const
Definition ZoomableComponent.cpp:3
void fillNormalisedZoomedEllipse(Graphics &g, const Rectangle< float > &bounds)
Definition ZoomableComponent.cpp:80
void drawNormalisedZoomedEllipse(Graphics &g, const Rectangle< float > &bounds)
Definition ZoomableComponent.cpp:85
float m_vCenter
Definition ZoomableComponent.h:71
float m_vZoom
Definition ZoomableComponent.h:70
Definition AirAbsorptionFilter.cpp:2