コード例 #1
0
ファイル: alfgc.cpp プロジェクト: cdaffara/symbiandump-mw4
// ---------------------------------------------------------------------------
// 
// ---------------------------------------------------------------------------
//
void CAlfGc::DrawText(const TDesC& aText, const TAlfRealRect& aDestinationRect)
    {
        TPtrC8 ptr(reinterpret_cast<const TUint8 *>(aText.Ptr()), aText.Length()*2);                
        AppendCommand( EAlfCanvasPrepareDrawText, ptr );
        
        const TAlfCanvasDrawTextParams params = { 
            aDestinationRect.iTl.iX,
            aDestinationRect.iTl.iY,
            aDestinationRect.iBr.iX,
            aDestinationRect.iBr.iY
            };
        TPckgC<TAlfCanvasDrawTextParams> paramsPckg( params );                    
        AppendCommand( EAlfCanvasDrawText, paramsPckg );        
    }
コード例 #2
0
void
DrawTargetCaptureImpl::PushLayer(bool aOpaque,
                                 Float aOpacity,
                                 SourceSurface* aMask,
                                 const Matrix& aMaskTransform,
                                 const IntRect& aBounds,
                                 bool aCopyBackground)
{
  // Have to update mPermitSubpixelAA for this DT
  // because some code paths query the current setting
  // to determine subpixel AA eligibility.
  PushedLayer layer(GetPermitSubpixelAA());
  mPushedLayers.push_back(layer);
  DrawTarget::SetPermitSubpixelAA(aOpaque);

  if (aMask) {
    aMask->GuaranteePersistance();
  }

  AppendCommand(PushLayerCommand)(aOpaque,
                                  aOpacity,
                                  aMask,
                                  aMaskTransform,
                                  aBounds,
                                  aCopyBackground);
}
コード例 #3
0
void
DrawTargetCaptureImpl::Mask(const Pattern &aSource,
                            const Pattern &aMask,
                            const DrawOptions &aOptions)
{
  AppendCommand(MaskCommand)(aSource, aMask, aOptions);
}
コード例 #4
0
ファイル: alfgc.cpp プロジェクト: cdaffara/symbiandump-mw4
// ---------------------------------------------------------------------------
// 
// ---------------------------------------------------------------------------
//
void CAlfGc::SetTextStyle(const CAlfTextStyle& aTextStyle)
    {
    TInt serverSideTextStyleId = aTextStyle.ServerHandle();    
    TAlfCanvasSetTextStyleParams params = {serverSideTextStyleId};
    TPckgC<TAlfCanvasSetTextStyleParams> paramsPckg( params );                    
    AppendCommand( EAlfCanvasSetTextStyle, paramsPckg );        
    }
コード例 #5
0
ファイル: CodeGenProl16.cpp プロジェクト: Djon/COM
 // data transfer
 WORD CodeGenProl16::LoadI(BYTE aReg, WORD aData)
 {
    AppendCommand(OPCODE_LOADI, aReg, 0);
    WORD codePosData = mBufPos;
    AppendWord(aData);
    return codePosData;
 }
コード例 #6
0
void
DrawTargetCaptureImpl::FillRect(const Rect& aRect,
                                const Pattern& aPattern,
                                const DrawOptions& aOptions)
{
  AppendCommand(FillRectCommand)(aRect, aPattern, aOptions);
}
コード例 #7
0
void
DrawTargetCaptureImpl::Fill(const Path* aPath,
                            const Pattern& aPattern,
                            const DrawOptions& aOptions)
{
  AppendCommand(FillCommand)(aPath, aPattern, aOptions);
}
コード例 #8
0
void DrawTargetCaptureImpl::StrokeGlyphs(ScaledFont* aFont,
                                         const GlyphBuffer& aBuffer,
                                         const Pattern& aPattern,
                                         const StrokeOptions& aStrokeOptions,
                                         const DrawOptions& aOptions)
{
  AppendCommand(StrokeGlyphsCommand)(aFont, aBuffer, aPattern, aStrokeOptions, aOptions);
}
コード例 #9
0
void
DrawTargetCaptureImpl::Blur(const AlphaBoxBlur& aBlur)
{
  // gfxAlphaBoxBlur should not use this if it takes the accelerated path.
  MOZ_ASSERT(GetBackendType() == BackendType::SKIA);

  AppendCommand(BlurCommand)(aBlur);
}
コード例 #10
0
void
DrawTargetCaptureImpl::CopySurface(SourceSurface* aSurface,
                                   const IntRect& aSourceRect,
                                   const IntPoint& aDestination)
{
  aSurface->GuaranteePersistance();
  AppendCommand(CopySurfaceCommand)(aSurface, aSourceRect, aDestination);
}
コード例 #11
0
void
DrawTargetCaptureImpl::StrokeRect(const Rect& aRect,
                                  const Pattern& aPattern,
                                  const StrokeOptions& aStrokeOptions,
                                  const DrawOptions& aOptions)
{
  AppendCommand(StrokeRectCommand)(aRect, aPattern, aStrokeOptions, aOptions);
}
コード例 #12
0
void
DrawTargetCaptureImpl::Stroke(const Path* aPath,
                              const Pattern& aPattern,
                              const StrokeOptions& aStrokeOptions,
                              const DrawOptions& aOptions)
{
  AppendCommand(StrokeCommand)(aPath, aPattern, aStrokeOptions, aOptions);
}
コード例 #13
0
void
DrawTargetCaptureImpl::FillGlyphs(ScaledFont* aFont,
                                  const GlyphBuffer& aBuffer,
                                  const Pattern& aPattern,
                                  const DrawOptions& aOptions,
                                  const GlyphRenderingOptions* aRenderingOptions)
{
  AppendCommand(FillGlyphsCommand)(aFont, aBuffer, aPattern, aOptions, aRenderingOptions);
}
コード例 #14
0
void
DrawTargetCaptureImpl::MaskSurface(const Pattern &aSource,
                                   SourceSurface *aMask,
                                   Point aOffset,
                                   const DrawOptions &aOptions)
{
  aMask->GuaranteePersistance();
  AppendCommand(MaskSurfaceCommand)(aSource, aMask, aOffset, aOptions);
}
コード例 #15
0
void
DrawTargetCaptureImpl::PopLayer()
{
  MOZ_ASSERT(mPushedLayers.size());
  DrawTarget::SetPermitSubpixelAA(mPushedLayers.back().mOldPermitSubpixelAA);
  mPushedLayers.pop_back();

  AppendCommand(PopLayerCommand)();
}
コード例 #16
0
void
DrawTargetCaptureImpl::StrokeLine(const Point& aStart,
                                  const Point& aEnd,
                                  const Pattern& aPattern,
                                  const StrokeOptions& aStrokeOptions,
                                  const DrawOptions& aOptions)
{
  AppendCommand(StrokeLineCommand)(aStart, aEnd, aPattern, aStrokeOptions, aOptions);
}
コード例 #17
0
void
DrawTargetCaptureImpl::DrawSurface(SourceSurface *aSurface,
                                   const Rect &aDest,
                                   const Rect &aSource,
                                   const DrawSurfaceOptions &aSurfOptions,
                                   const DrawOptions &aOptions)
{
  aSurface->GuaranteePersistance();
  AppendCommand(DrawSurfaceCommand)(aSurface, aDest, aSource, aSurfOptions, aOptions);
}
コード例 #18
0
void VGUICommandBuffer::SetScissorRect(const VRectanglef *pScreenRect)
{
  if (m_iLastCommand==COMMAND_SCISSOR) // take a shortcut: overwrite last command
    m_iCommandCount = m_iLastCommandBlockPos - 1;

  bool bIsNull = pScreenRect==NULL;
  AppendCommand(COMMAND_SCISSOR,&bIsNull,sizeof(bool));
  if (!bIsNull)
    Append(pScreenRect,sizeof(VRectanglef));
}
コード例 #19
0
void
DrawTargetCaptureImpl::DrawFilter(FilterNode *aNode,
                                  const Rect &aSourceRect,
                                  const Point &aDestPoint,
                                  const DrawOptions &aOptions)
{
  // @todo XXX - this won't work properly long term yet due to filternodes not
  // being immutable.
  AppendCommand(DrawFilterCommand)(aNode, aSourceRect, aDestPoint, aOptions);
}
コード例 #20
0
ファイル: alfgc.cpp プロジェクト: cdaffara/symbiandump-mw4
void CAlfGc::DrawEllipse(const TAlfRealRect& aDestinationRect)
	{
	const TAlfCanvasDrawEllipseParams params = {
        aDestinationRect.iTl.iX,
        aDestinationRect.iTl.iY,
        aDestinationRect.iBr.iX,
        aDestinationRect.iBr.iY
     };
    TPckgC<TAlfCanvasDrawEllipseParams> paramsPckg( params );
    AppendCommand( EAlfCanvasDrawEllipse, paramsPckg );
	}
コード例 #21
0
ファイル: alfgc.cpp プロジェクト: cdaffara/symbiandump-mw4
void CAlfGc::DrawRects(const RArray<TReal32> & aRectPointCords)
	{
	HBufC8* buffer = NULL;
    TRAP_IGNORE(buffer = AlfGcExternalizeL(aRectPointCords))
    if (buffer)
        {        
    	AppendCommand( EAlfCanvasDrawRects, *buffer );
    	delete buffer;
    	buffer = NULL;
        }
	}
コード例 #22
0
void
DrawTargetCaptureImpl::DrawSurfaceWithShadow(SourceSurface *aSurface,
                                             const Point &aDest,
                                             const Color &aColor,
                                             const Point &aOffset,
                                             Float aSigma,
                                             CompositionOp aOperator)
{
  aSurface->GuaranteePersistance();
  AppendCommand(DrawSurfaceWithShadowCommand)(aSurface, aDest, aColor, aOffset, aSigma, aOperator);
}
コード例 #23
0
void VGUICommandBuffer::SetDepth(float fZCoord)
{
  if (m_fLastDepth==fZCoord)
    return;

  m_fLastDepth = fZCoord;

  if (m_iLastCommand==COMMAND_DEPTH) // take a shortcut: overwrite last command
    m_iCommandCount = m_iLastCommandBlockPos - 1;

  AppendCommand(COMMAND_DEPTH,&fZCoord,sizeof(fZCoord));
}
コード例 #24
0
ファイル: alfgc.cpp プロジェクト: cdaffara/symbiandump-mw4
// ---------------------------------------------------------------------------
// 
// ---------------------------------------------------------------------------
//
void CAlfGc::DrawImage(const CAlfTexture& aTexture, const TAlfRealRect& aDestinationRect)   
    {
    TInt serversideTexture = aTexture.ServerHandle();
    
    const TAlfCanvasDrawImageParams params = {serversideTexture, 
        aDestinationRect.iTl.iX,
        aDestinationRect.iTl.iY,
        aDestinationRect.iBr.iX,
        aDestinationRect.iBr.iY
     };
    TPckgC<TAlfCanvasDrawImageParams> paramsPckg( params );
    AppendCommand( EAlfCanvasDrawImage, paramsPckg );
    }
コード例 #25
0
ファイル: gcode.cpp プロジェクト: atoun/repsnapper
void GCodeState::MakeGCodeLine (Vector3d start, Vector3d end,
				Vector3d arcIJK, short arc,
				double extrusionFactor, 
				double absolute_extrusion,
				double maxspeed,
				double offsetZ, 
				const Settings::SlicingSettings &slicing,
				const Settings::HardwareSettings &hardware)
{
   // if ((end-start).length() < 0.05)	// ignore micro moves
   //  return;

  Command command;
  command.is_value = false;

  bool relativeE = slicing.RelativeEcode;

  double minspeed = hardware.MinPrintSpeedXY;
  maxspeed = max(minspeed,maxspeed); // in case maxspeed is too low
  ResetLastWhere (start);
  command.where = end;
  double extrudedMaterial;
  if (start==end)  { // pure extrusions
    extrudedMaterial = 0;
    command.comment = _("Extrusion only ");
  } else 
    extrudedMaterial = DistanceFromLastTo(command.where)*extrusionFactor;

  if (absolute_extrusion!=0) {
    command.comment += _("Absolute Extrusion");
  }
  extrudedMaterial += absolute_extrusion;
  command.e = extrudedMaterial;
  command.f = maxspeed;
  if (arc == 0) { // make line
    command.Code = COORDINATEDMOTION;
  } else { // make arc
    if (arc==1) {
      command.Code = ARC_CW;
      command.comment = "cw arc";
    }
    else if (arc==-1) {
      command.Code = ARC_CCW;
      command.comment = "ccw arc";
    }
    else cerr << "Undefined arc direction! "<< arc << endl;
    command.arcIJK = arcIJK;
  }
  AppendCommand(command,relativeE);
}
コード例 #26
0
void VGUICommandBuffer::Draw2DBufferWithShader(int iVertexCount, Overlay2DVertex_t *pVertices, VTextureObject *pTexture, VCompiledShaderPass &shader)
{
  if (m_iLastCommand==COMMAND_DRAWSHADER && m_pLastTex==pTexture && m_pLastShader==&shader) // append
  {
    if (m_eCacheState != Cache_DryRun)
    {
      int *pOldVertexCount = ((int *)&m_Commands.GetDataPtr()[m_iLastCommandBlockPos]);
      (*pOldVertexCount) += iVertexCount;
    }
  }
  else
  {
    m_pLastShader = &shader;
    m_pLastTex = pTexture;
    AppendCommand(COMMAND_DRAWSHADER);
    Append(&iVertexCount,sizeof(int));
    Append(&pTexture,sizeof(VTextureObject *));
    Append(&m_pLastShader,sizeof(VCompiledShaderPass &));
  }
  Append(pVertices,sizeof(Overlay2DVertex_t)*iVertexCount);
}
コード例 #27
0
void VGUICommandBuffer::Draw2DBuffer(int iVertexCount, Overlay2DVertex_t *pVertices, VTextureObject *pTexture, const VSimpleRenderState_t &iProperties)
{
  if (m_iLastCommand==COMMAND_DRAW && m_pLastTex==pTexture && m_iLastState==iProperties) // append
  {
    if (m_eCacheState != Cache_DryRun)
    {
      int *pOldVertexCount = ((int *)&m_Commands.GetDataPtr()[m_iLastCommandBlockPos]);
      (*pOldVertexCount) += iVertexCount;
    }
  }
  else
  {
    AppendCommand(COMMAND_DRAW);
    Append(&iVertexCount,sizeof(int));
    Append(&pTexture,sizeof(VTextureObject *));
    Append(&iProperties,sizeof(iProperties));
    m_iLastState = iProperties;
    m_pLastTex = pTexture;
  }

  Append(pVertices,sizeof(Overlay2DVertex_t)*iVertexCount);
}
コード例 #28
0
	/** Same as above, but loads strings from string resources.*/
	static VBOOL	AppendCommand(	VUINT		nDotFileExtensionID,
									VUINT		nCommandID,
									VUINT		nFileTypeID = 0,
									VUINT		nAppTitleID = 0,
									HINSTANCE	hResource = NULL,
									HINSTANCE	hAltModuleHandle = NULL)
	{
		VASSERT(nDotFileExtensionID && nCommandID)

		VString sFileType, sAppTitle;

		if ( nFileTypeID )
			sFileType.Load(nFileTypeID, hResource);

		if ( nAppTitleID )
			sAppTitle.Load(nAppTitleID, hResource);

		return AppendCommand(	VString(nDotFileExtensionID, hResource),
								VString(nCommandID, hResource),
								sFileType,
								sAppTitle,
								hAltModuleHandle);
	}
コード例 #29
0
CManageClient::CManageClient(){
    AppendCommand(new CUSERCommand);
    AppendCommand(new CPASSCommand);
    AppendCommand(new CLISTCommand);
    AppendCommand(new CPWDCommand);
    AppendCommand(new CQUITCommand);
    AppendCommand(new CCWDCommand);
    AppendCommand(new CPASVCommand);
    AppendCommand(new CSIZECommand);
    AppendCommand(new CRETRCommand);
    AppendCommand(new CSYSTCommand);
    AppendCommand(new CTYPECommand);
    AppendCommand(new CSTORCommand);
    AppendCommand(new CDELECommand);
    AppendCommand(new CMKDCommand);
    AppendCommand(new CRNFRCommand);
    AppendCommand(new CRNTOCommand);
    AppendCommand(new CRMDCommand);
    AppendCommand(new CPORTCommand);
}
コード例 #30
0
void
DrawTargetCaptureImpl::PadEdges(const IntRegion& aRegion)
{
  AppendCommand(PadEdgesCommand)(aRegion);
}