void CIppsSignalDC::DrawSignalBackground(int zero) { CBrush brush(GetColorSignalBack()); CPen pen(PS_SOLID, 1, GetColorAxis()); SelectObject(&pen); SelectObject(&brush); Rectangle(GetX0(),GetY0(zero),GetX1(),GetY1(zero)); }
void CIppsSignalDC::DrawAxisX(int zero, BOOL bIm) { int x0 = GetX0(); int x1 = GetX1(); int y0 = GetY0(zero); int y1 = GetY1(zero); double step = GetStepAxis(GetMinStepX(), m_pSignal->Length()); double gap = step*FactorX(); for (int i=1 ;; i++) { int x = (int)(gap*i); if (x0 + x > x1) break; DrawLabelX(x0 + x, y0, (int)(step*i + .5), SIDE_BOTTOM); DrawLabelX(x0 + x, y1, (int)(step*i + .5), bIm ? 0 : SIDE_TOP); } }
// Write a BufferType line to the output. bool CNCSJPCCodeBlock::WriteLine(ContextID nCtx, CNCSJPCBuffer *pSrc, UINT16 iComponent) { nCtx;iComponent;//Keep compiler happy bool bRet = true; CNCSJPCResolution *pResolution = m_pSubBand->m_pPrecinct->m_pResolution; CNCSJPCBuffer tmp; tmp.Assign(0, 0, GetWidth(), GetHeight(), pSrc->GetType(), m_pSubBand->GetPtr(GetX0(), GetY0()), m_pSubBand->GetStep()); // Last scanline, encode block CNCSJPCComponent *pComponent = pResolution->m_pComponent; bRet &= sm_Coder.Encode(m_pSubBand->m_eType, pComponent->m_QuantizationStyle.m_Sqc.m_nGuardBits + pComponent->m_QuantizationStyle.m_SPqc[m_pSubBand->m_eType].m_nReversible - 1, m_nZeroBits, m_Segments, &tmp, pResolution->m_nCompressionRatio, pResolution->m_pComponent->m_CodingStyle.m_SGcod.m_nLayers); UINT32 nSegs = (UINT32)m_Segments.size(); for(UINT32 s = 0; s < nSegs; s++) { sm_Tracker.AddMem(m_Segments[s].m_nLength); } //printf("%ld %ld (%ld)\r\n", m_Segments[0].m_nLength, m_Segments[0].m_nPasses, m_nZeroBits); // if(m_nZeroBits > 16) { // printf("HERE"); // } // char buf[1024]; // sprintf(buf, "CB %ld src %ld sb %ld\r\n", GetY0(), pSrc->GetY0(), m_pSubBand->GetY0()); // OutputDebugStringA(buf); return(bRet); }
void Viewport::Apply() const { GLFunctions::glViewport(GetX0(), GetY0(), GetWidth(), GetHeight()); }