Giter VIP home page Giter VIP logo

onbon.bx05.api's People

Contributors

api2doc avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gazer2kanlin

onbon.bx05.api's Issues

TextBxPage 设置LineBreak为false无效

我设置了文本不换行( page.setLineBreak(false),在led上显示的时候依然换行
Bx5GEnv.initial("log.properties", 30000);
Bx5GScreenClient screen = new Bx5GScreenClient("MyScreen");
for (String ip : program.getTerminals()) {
ScreenStatus res=new ScreenStatus();
res.setIp(ip);
if (!screen.connect(ip, 5005)) {
res.setStatus("fail");
res.setMessage("connect failed.");
reslist.add(res);
continue;
}
Bx5GScreenProfile profile = screen.getProfile();
DisplayStyle[] styles = DisplayStyleFactory.getStyles().toArray(new DisplayStyle[0]);
ProgramBxFile p000 = new ProgramBxFile("P000", profile);
// 是否显示节目边框
p000.setFrameShow(false);
p000.setupStartEndDate(program.getStartdate(), program.getEnddate());
if(program.getStarttime()!=null&&program.getEndtime()!=null){
String format="hh:mm:ss";
Date startTime=LEDUtil.ConvertStrToDate(program.getStarttime(),format);
Date endTime=LEDUtil.ConvertStrToDate(program.getEndtime(),format);
p000.addPlayPeriodSetting(startTime.getHours(), startTime.getMinutes(), startTime.getSeconds(), endTime.getHours(), endTime.getMinutes(), endTime.getSeconds());
}
TextCaptionBxArea tArea = new TextCaptionBxArea(2, 2, profile.getWidth()-3, profile.getHeight()-3, screen.getProfile());
// 使能区域边框
tArea.setFrameShow(false);
// 创建一个数据页,并希望显示 “P009” 这几个文字
TextBxPage page = new TextBxPage(LEDUtil.getShowText(program.getTexts(),program.getSpaces()));
// 对文本的处理是否自动换行
page.setLineBreak(false);
// 设置文本水平对齐方式
page.setHorizontalAlignment(TextBinary.Alignment.NEAR);
// 设置文本垂直居中方式
page.setVerticalAlignment(TextBinary.Alignment.CENTER);
// 设置文本字体
page.setFont(new Font(program.getFamily(), Font.PLAIN, program.getSize())); // 字体
// 设置文本颜色
page.setForeground(new Color(program.getColor()[0],program.getColor()[1],program.getColor()[2]));
// 设置区域背景色,默认为黑色
page.setBackground(new Color(program.getBgcolor()[0],program.getBgcolor()[1],program.getBgcolor()[2],program.getAlpha()));
// 调整特技方式
page.setDisplayStyle(styles[program.getEffect()]);
// 调整特技速度
page.setSpeed(program.getSpeed());
//
page.setHeadTailInterval(0);
// 调整停留时间, 单位 10ms
page.setStayTime(program.getDuration());
// 将前面创建的 page 添加到 area 中
tArea.addPage(page);
p000.addArea(tArea);
ArrayList plist1 = new ArrayList();
plist1.add(p000);
screen.writePrograms(plist1);
screen.disconnect();

关于仰邦控制卡请教

很高兴看到你的分享demo,现有一问题想向您请教:该demo示例是否支持发送图片?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.