Definition at line 206 of file XferSlide.cpp.
◆ CubicResamplerSlide()
CubicResamplerSlide::CubicResamplerSlide |
( |
| ) |
|
|
inline |
◆ draw()
void CubicResamplerSlide::draw |
( |
SkCanvas * |
canvas | ) |
|
|
inlineoverrideprotectedvirtual |
Implements Slide.
Definition at line 225 of file XferSlide.cpp.
225 {
226 for (const auto& rec : fRecs) {
227 rec.draw(canvas, fCubic);
228 }
229
231 paint.setAntiAlias(
true);
232 paint.setStroke(
true);
234
236 paint.setStroke(
false);
239
241 str.
printf(
"B=%4.2f C=%4.2f", fCubic.
B, fCubic.
C);
248 }
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
@ kUTF8
uses bytes to represent UTF-8 or ASCII
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawSimpleText(const void *text, size_t byteLength, SkTextEncoding encoding, SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
@ kAntiAlias
may have transparent pixels on glyph edges
static SkMatrix RectToRect(const SkRect &src, const SkRect &dst, ScaleToFit mode=kFill_ScaleToFit)
void printf(const char format[],...) SK_PRINTF_LIKE(2
const char * c_str() const
font
Font Metadata and Metrics.
SkScalar fBottom
larger y-axis bounds
SkScalar fLeft
smaller x-axis bounds
◆ load()
|
inlineoverrideprotectedvirtual |
Reimplemented from Slide.
Definition at line 213 of file XferSlide.cpp.
213 {
214 SkRect r = {10, 10, 200, 200};
215 for (
const char*
name : {
"images/mandrill_128.png",
216 "images/rle.bmp",
217 "images/example_4.png"}) {
220 }
222 fCubic = {.3f, .5f};
223 }
DEF_SWITCHES_START aot vmservice shared library name
void setXYWH(float x, float y, float width, float height)
void offset(float dx, float dy)
constexpr float height() const
constexpr float width() const
◆ onClick()
|
inlineoverrideprotectedvirtual |
◆ onFindClickHandler()
|
inlineoverrideprotectedvirtual |
Return a Click object to handle the click. onClick will be called repeatedly with the latest mouse state tracked on the Click object until it returns false.
Implements ClickHandlerSlide.
Definition at line 261 of file XferSlide.cpp.
261 {
263 return new Click([this](Click* click) {
266 return true;
267 });
268 }
269 return nullptr;
270 }
static float pin_unitize(float min, float max, float value)
bool contains(SkScalar x, SkScalar y) const
◆ pin_unitize() [1/2]
Definition at line 253 of file XferSlide.cpp.
253 {
254 return {
257 };
258 }
SkScalar fRight
larger x-axis bounds
SkScalar fTop
smaller y-axis bounds
◆ pin_unitize() [2/2]
static float CubicResamplerSlide::pin_unitize |
( |
float |
min, |
|
|
float |
max, |
|
|
float |
value |
|
) |
| |
|
inlinestaticprotected |
Definition at line 250 of file XferSlide.cpp.
250 {
252 }
static float max(float r, float g, float b)
static float min(float r, float g, float b)
The documentation for this class was generated from the following file: