Comments (2)
Hey @MansonLuo, sorry for the delay! I was moving out and I haven't had much time lately
But for your question, you can use the image analyzer for QRCode. there's an example on sample app, you also can check the wiki for more information
Now for the semi-transparent layer, you can create your custom on content parameter
// Sample canvas for QR code
@Composable
fun QRCodeMask(
modifier: Modifier = Modifier
) {
Canvas(
modifier = modifier,
onDraw = {
val circlePath = Path().apply {
addRect(Rect(center, size.minDimension / 3))
}
clipPath(circlePath, clipOp = ClipOp.Difference) {
drawRect(SolidColor(Color.Black.copy(alpha = 0.8f)))
}
}
)
}
@Composable
fun QRCodeCamera() {
CameraPreview() {
// Here!
QRCodeMask(Modifier.fillMaxSize())
// Code...
}
}
Result:
from camposer.
Since this is not a part of the library, I will close the issue. However, feel free to ask any questions you may have.
from camposer.
Related Issues (20)
- ByteArray as return on ImageCaptureResult HOT 4
- API 21: support HOT 4
- Add support for Audio config HOT 1
- Documentation example raise type mismatch HOT 1
- Aspect Ratio support. HOT 2
- Image rotation issue HOT 5
- Update CameraX to 1.2.2 HOT 5
- Add support for UVC Camera HOT 4
- Provide way to access underlying CameraController HOT 1
- add control the exposure? HOT 2
- Add focus mode adjustment and exposure support HOT 1
- Aspect Ratio support. HOT 1
- Add takePicture with ImageCapture and update camera to 1.3 HOT 2
- Can't change alpha on `CameraPreview` HOT 3
- Make `CameraState` public HOT 4
- Allow VideoCapture to be used with Image Analysis.
- Still can't figure out how to change aspect ratio! HOT 1
- Enabled use case problem HOT 7
- CameraPreview extends over parent size on API level 24 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camposer.