FIX: Upgrade the texture image

align texture image  to the grid of the x1 machine
Jira:STUDIO-4206

Change-Id: I7dcc5061017f355f30b3f584180751ec7a3f391b
(cherry picked from commit 7ec89042246162edc04e32abe2b609f5f561d810)
This commit is contained in:
zhou.xu 2023-08-24 16:25:24 +08:00 committed by Lane.Wei
parent ac988a5c53
commit 2d9451e545
10 changed files with 304 additions and 350 deletions

View file

@ -5144,15 +5144,15 @@ void PartPlateList::BedTextureInfo::TexturePart::update_buffer()
void PartPlateList::init_bed_type_info()
{
BedTextureInfo::TexturePart pc_part1( 5, 130, 10, 110, "bbl_bed_pc_left.svg");
BedTextureInfo::TexturePart pc_part2( 74, -12, 150, 12, "bbl_bed_pc_bottom.svg");
BedTextureInfo::TexturePart ep_part1( 4, 87, 12, 153, "bbl_bed_ep_left.svg");
BedTextureInfo::TexturePart ep_part2( 72, -11, 150, 12, "bbl_bed_ep_bottom.svg");
BedTextureInfo::TexturePart pei_part1( 6, 50, 12, 190, "bbl_bed_pei_left.svg");
BedTextureInfo::TexturePart pei_part2(72, -11, 150, 12, "bbl_bed_pei_bottom.svg");
BedTextureInfo::TexturePart pte_part1( 6, 40, 12, 200, "bbl_bed_pte_left.svg");
BedTextureInfo::TexturePart pte_part2(72, -11, 150, 12, "bbl_bed_pte_bottom.svg");
for (size_t i = 0; i < btCount; i++) {
BedTextureInfo::TexturePart pc_part1(10, 130, 10, 110, "bbl_bed_pc_left.svg");
BedTextureInfo::TexturePart pc_part2(74, -10, 148, 12, "bbl_bed_pc_bottom.svg");
BedTextureInfo::TexturePart ep_part1(7.5, 90, 12.5, 150, "bbl_bed_ep_left.svg");
BedTextureInfo::TexturePart ep_part2(74, -10, 148, 12, "bbl_bed_ep_bottom.svg");
BedTextureInfo::TexturePart pei_part1(7.5, 50, 12.5, 190, "bbl_bed_pei_left.svg");
BedTextureInfo::TexturePart pei_part2(74, -10, 148, 12, "bbl_bed_pei_bottom.svg");
BedTextureInfo::TexturePart pte_part1(10, 80, 10, 160, "bbl_bed_pte_left.svg");
BedTextureInfo::TexturePart pte_part2(74, -10, 148, 12, "bbl_bed_pte_bottom.svg");
for (size_t i = 0; i < btCount; i++) {
bed_texture_info[i].parts.clear();
}
bed_texture_info[btPC].parts.push_back(pc_part1);
@ -5172,7 +5172,7 @@ void PartPlateList::init_bed_type_info()
float x_rate = bed_width / base_width;
float y_rate = bed_height / base_height;
for (int i = 0; i < btCount; i++) {
for (int j = 0; j < bed_texture_info[i].parts.size(); j++) {
for (int j = 0; j < bed_texture_info[i].parts.size(); j++) {
bed_texture_info[i].parts[j].x *= x_rate;
bed_texture_info[i].parts[j].y *= y_rate;
bed_texture_info[i].parts[j].w *= x_rate;