Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 38eb598b8e29
Choose a base ref
...
head repository: ngscopeclient/scopehal-apps
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3fdaa009e014
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 15, 2020

  1. Copy the full SHA
    3fdaa00 View commit details
Showing with 11 additions and 11 deletions.
  1. +11 −11 glscopeclient/ProtocolAnalyzerWindow.cpp
22 changes: 11 additions & 11 deletions glscopeclient/ProtocolAnalyzerWindow.cpp
Original file line number Diff line number Diff line change
@@ -168,24 +168,24 @@ void ProtocolAnalyzerWindow::OnWaveformDataReady()
auto vp = dynamic_cast<VideoScanlinePacket*>(p);
if(vp != NULL)
{
//Create the image data
vp->m_image = p->m_data;
size_t rowsize = vp->m_image.size();
size_t rowsize = p->m_data.size();
size_t width = rowsize / 3;
size_t height = 24;
size_t bcount = rowsize * height;
vp->m_image.resize(bcount);
for(size_t y=1; y<height; y++)
memcpy(&vp->m_image[y*rowsize], &vp->m_image[0], rowsize);

row[m_columns.m_image] = Gdk::Pixbuf::create_from_data(
&vp->m_image[0],
Glib::RefPtr<Gdk::Pixbuf> image = Gdk::Pixbuf::create(
Gdk::COLORSPACE_RGB,
false,
8,
width,
height,
rowsize);
height);

//Make a 2D image
uint8_t* pixels = image->get_pixels();
size_t bcount = rowsize * height;
for(size_t y=0; y<height; y++)
memcpy(pixels + y*rowsize, &p->m_data[0], rowsize);

row[m_columns.m_image] = image;
}

//Select the newly added row