为什么要在ZXing中实现rotateCounterClockwise()?
我正在创建 LuminanceSource
的子类。我是否有理由期望或必须实现rotateCounterClockwise()
?
对性能或可靠性(或两者)的影响?
I am creating a subclass to LuminanceSource
. Is there a reason why I should expect to or have to implement rotateCounterClockwise()
?
Implications to performance or reliability (or both)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您不想实现它,您始终可以使用
isRotateSupported()
并让该方法抛出异常。提供它是因为接口不知道您的内部结构是什么样的,所以否则旋转涉及将您的数据转换为通用格式,执行转换,然后将通用格式数据转换回您的格式。
You can always have
isRotateSupported()
and make that method throw an exception if you don't want to implement it.It is provided because the interface does not know what your internal structure is like, so otherwise a rotation involves converting your data to a common format, performing the transform, then converting the common format data back into your format.