BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: Rotating images, and CMD_TEXT not showing  (Read 8116 times)

jlewis

  • Newbie
  • *
  • Posts: 8
    • View Profile
Rotating images, and CMD_TEXT not showing
« on: December 21, 2023, 11:21:12 PM »

Hello,

I've loaded some images from flash and one in particular I am loading and then rotating several times.  I don't understand the transform/translate stuff so I couldn't get CMD_ROTATE to work.  I am using CMD_ROTATEAROUND which is fine, but even then I have to make my image square or else some part will be clipped off after rotation.

Is there a good explanation anywhere on what the CMD_TRANSLATE does, and how it interacts with CMD_LOADIDENTIY, CMD_SETMATRIX, and CMD_ROTATE?

I'm basically making the 4 quadrants of a circle by loading one quadrant image and then rotating it 3 times to complete the circle.  Is it better to do that, or to have 4 quadrant images already rotated in the correct way and avoid the rotation?

So I've loaded and rotated like so:
CMD_FLASHREAD(0, 8512, 18496)
CMD_SETBITMAP(0, COMPRESSED_RGBA_ASTC_8x8_KHR, 272, 272)
BEGIN(BITMAPS)
CMD_LOADIDENTITY()
VERTEX2F(4233, 3225)
CMD_ROTATEAROUND(136, 136, 16384, 65536)
CMD_SETMATRIX();
VERTEX2F(1744, 5472)
END()

If after that I try to add:
COLOR_RGB(241, 28, 0)
CMD_TEXT(296, 152, 30, 0, "VH6C-101")

The text does not show up.  I can move it above the FLASHREAD and it works.  If I take out either the CMD_ROTATEAROUND or CMD_SETMATRIX it works.  If I go in to the Inspector window of EVE Screen Editor I can see in the RAM_DL that there are several commands, then a DISPLAY(), then a couple more VERTEX2II commands, then the rest of RAM_DL is filled with DISPLAY().  So it doesn't seem like that first DISPLAY() should be there, right?

Also, is there any way to modify a small part of what is already drawn on screen, like changing some text or changing the color of something, without having to redo the whole display list?

Thank you for any help.
« Last Edit: December 21, 2023, 11:27:10 PM by jlewis »
Logged

jlewis

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Rotating images, and CMD_TEXT not showing
« Reply #1 on: January 12, 2024, 05:20:16 PM »

Does anybody have guidance on any of the questions above?
Logged

jlewis

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Rotating images, and CMD_TEXT not showing
« Reply #2 on: February 22, 2024, 10:16:44 PM »

Another ping.  Would love some help on why after CMD_ROTATEAROUND and CMD_SETMATRIX I can't see any new text I add to the Coprocessor command list.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 748
    • View Profile
Re: Rotating images, and CMD_TEXT not showing
« Reply #3 on: February 29, 2024, 02:41:01 PM »

Hello,

Regarding the issue with your text, your matrix will be getting applied to the following items too and so one suggestion is to revert the matrix to the identity matrix again via
CMD_LOADIDENTITY
CMD_SETMATRIX
before you proceed to draw the other items such as text which you do not want to be rotated,

Best Regards, BRT Community
Logged