gpt4 book ai didi

android - 将指南覆盖添加到 Flex 视频组件(移动摄像头)。

转载 作者:行者123 更新时间:2023-11-29 04:13:47 24 4
gpt4 key购买 nike

我正在开发一个可以读取 QRCodes 的 Flex 移动应用程序。为了帮助用户对齐代码,我想在视频面板的中心放置一个指南框。我使用的是包含绿色矩形和透明背景的 PNG。我对所有建议持开放态度。下面显示了一切是如何工作的。

Flash 脚本之外:

<s:VGroup width="100%" horizontalAlign="center" id="vg">

<s:SpriteVisualElement id="sv" width="100%" height="250"/>

</s:VGroup>

在创建相机方法中:

camera = Camera.getCamera();
camera.setMode(360, 360, 24);

videoDisplay.x = 360;
sv.addChild(videoDisplay);

videoDisplay.attachCamera(camera);
videoDisplay.rotation = 90;

任何指示将不胜感激。我已经尝试过几种方法,通常图像显示在摄像机视频窗口附近而不是在其上方。

最佳答案

一些位置很好的小组会做到这一点......就像这样:

    <s:Group width="100%" height="250">
<s:SpriteVisualElement id="sv" width="100%" height="100%"/>
<!-- nesting in another VGroup will allow you to center the image on the video -->
<s:VGroup verticalAlign="middle" horizontalAlign="center"
width="100%" height="100%">
<!-- depending on size of the image, you might want to set scaling/maxWidth etc here -->
<s:Image source="{yourImagePathOrClass}" />
</s:VGroup>
</s:Group>

关于android - 将指南覆盖添加到 Flex 视频组件(移动摄像头)。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13997524/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com