Ticket #1765: dvdhighlight.patch

File dvdhighlight.patch, 1.2 KB (added by david.asher@…, 18 years ago)
  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    59285928                hl_button.setPixel(x, y, pixel);
    59295929            }
    59305930        }
    5931         float hmult = osd->GetSubtitleBounds().width() / 720.0;
    5932         float vmult = osd->GetSubtitleBounds().height() / 480.0;
    59335931
     5932        // scale highlight image to match OSD size, if required
     5933        float hmult = osd->GetSubtitleBounds().width() / (float)video_width;
     5934        float vmult = osd->GetSubtitleBounds().height() / (float)video_height;
     5935
     5936        if ((hmult < 0.99) || (hmult > 1.01) || (vmult < 0.99) || (vmult > 1.01))
     5937        {
     5938            btnX = (int)    (btnX * hmult);
     5939            btnY = (int)    (btnY * vmult);
     5940            w    = (int)ceil(w    * hmult);
     5941            h    = (int)ceil(h    * vmult);
     5942
     5943            hl_button = hl_button.smoothScale(w, h);
     5944        }
     5945        else
     5946            hmult = vmult = 1.0;
     5947
    59345948        OSDTypeImage* image = new OSDTypeImage();
    59355949        image->SetPosition(QPoint(btnX, btnY), hmult, vmult);
    59365950        image->LoadFromQImage(hl_button);