1#ifndef CANVAS_TRAVERSER_H
2#define CANVAS_TRAVERSER_H
5#include "medium_io/sequence/px_sequence_generator.h"
6#include "medium_io/sequence/ch_sequence_generator.h"
8namespace PxCryptPrivate
23 static quint64 channelsBeteween(
const Position& a,
const Position& b);
24 static Position fromBits(quint64 bitPos, quint8 bpc);
25 quint64 toBits(quint8 bpc)
const;
26 bool operator==(
const Position& other)
const =
default;
27 auto operator<=>(
const Position& other)
const noexcept =
default;
36 bool operator==(
const Selection& other)
const =
default;
41 PxSequenceGenerator::State pxState;
42 ChSequenceGenerator::State chState;
43 Position linearPosition;
44 Selection currentSelection;
53 std::unique_ptr<PxSequenceGenerator> mPxSequence;
54 std::unique_ptr<ChSequenceGenerator> mChSequence;
57 Position mLinearPosition;
58 Selection mCurrentSelection;
62 std::unique_ptr<State> mInitialState;
66 CanvasTraverser(MetaAccess& meta);
70 void restoreState(
const State& state);
72 void advanceChannel();
82 quint64 pixelIndex()
const;
83 Channel channel()
const;
84 int channelBitIndex()
const;
85 int remainingChannelBits()
const;
88 void advanceBits(
int bitCount);
89 bool bitAdvanceWillChangePixel(
int bitCount);
90 qint64 skip(qint64 bytes);
94 bool operator==(
const State& state)
const;