salgdi.cxx (5aaf853b) salgdi.cxx (e6f63103)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 35 unchanged lines hidden (view full) ---

44#include "unx/saldata.hxx"
45#include "unx/saldisp.hxx"
46#include "unx/salgdi.h"
47#include "unx/salframe.h"
48#include "unx/salvd.h"
49
50#include "printergfx.hxx"
51#include "xrender_peer.hxx"
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 35 unchanged lines hidden (view full) ---

44#include "unx/saldata.hxx"
45#include "unx/saldisp.hxx"
46#include "unx/salgdi.h"
47#include "unx/salframe.h"
48#include "unx/salvd.h"
49
50#include "printergfx.hxx"
51#include "xrender_peer.hxx"
52#include "region.h"
53
54#include <vector>
55#include <queue>
56#include <set>
57
58// -=-= SalPolyLine =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
59// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
60#define STATIC_POINTS 64

--- 524 unchanged lines hidden (view full) ---

585 }
586}
587
588bool X11SalGraphics::setClipRegion( const Region& i_rClip )
589{
590 if( mpClipRegion )
591 XDestroyRegion( mpClipRegion );
592 mpClipRegion = XCreateRegion();
52
53#include <vector>
54#include <queue>
55#include <set>
56
57// -=-= SalPolyLine =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
58// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
59#define STATIC_POINTS 64

--- 524 unchanged lines hidden (view full) ---

584 }
585}
586
587bool X11SalGraphics::setClipRegion( const Region& i_rClip )
588{
589 if( mpClipRegion )
590 XDestroyRegion( mpClipRegion );
591 mpClipRegion = XCreateRegion();
593
594 ImplRegionInfo aInfo;
595 long nX, nY, nW, nH;
596 bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
597 while( bRegionRect )
592
593 RectangleVector aRectangles;
594 i_rClip.GetRegionRectangles(aRectangles);
595
596 for(RectangleVector::const_iterator aRectIter(aRectangles.begin()); aRectIter != aRectangles.end(); aRectIter++)
598 {
597 {
599 if ( nW && nH )
598 const long nW(aRectIter->GetWidth());
599
600 if(nW)
600 {
601 {
601 XRectangle aRect;
602 aRect.x = (short)nX;
603 aRect.y = (short)nY;
604 aRect.width = (unsigned short)nW;
605 aRect.height = (unsigned short)nH;
606
607 XUnionRectWithRegion( &aRect, mpClipRegion, mpClipRegion );
602 const long nH(aRectIter->GetHeight());
603
604 if(nH)
605 {
606 XRectangle aRect;
607
608 aRect.x = (short)aRectIter->Left();
609 aRect.y = (short)aRectIter->Top();
610 aRect.width = (unsigned short)nW;
611 aRect.height = (unsigned short)nH;
612 XUnionRectWithRegion(&aRect, mpClipRegion, mpClipRegion);
613 }
608 }
614 }
609 bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
610 }
611
615 }
616
617 //ImplRegionInfo aInfo;
618 //long nX, nY, nW, nH;
619 //bool bRegionRect = i_rClip.ImplGetFirstRect(aInfo, nX, nY, nW, nH );
620 //while( bRegionRect )
621 //{
622 // if ( nW && nH )
623 // {
624 // XRectangle aRect;
625 // aRect.x = (short)nX;
626 // aRect.y = (short)nY;
627 // aRect.width = (unsigned short)nW;
628 // aRect.height = (unsigned short)nH;
629 //
630 // XUnionRectWithRegion( &aRect, mpClipRegion, mpClipRegion );
631 // }
632 // bRegionRect = i_rClip.ImplGetNextRect( aInfo, nX, nY, nW, nH );
633 //}
634
612 // done, invalidate GCs
613 bPenGC_ = sal_False;
614 bFontGC_ = sal_False;
615 bBrushGC_ = sal_False;
616 bMonoGC_ = sal_False;
617 bCopyGC_ = sal_False;
618 bInvertGC_ = sal_False;
619 bInvert50GC_ = sal_False;

--- 655 unchanged lines hidden ---
635 // done, invalidate GCs
636 bPenGC_ = sal_False;
637 bFontGC_ = sal_False;
638 bBrushGC_ = sal_False;
639 bMonoGC_ = sal_False;
640 bCopyGC_ = sal_False;
641 bInvertGC_ = sal_False;
642 bInvert50GC_ = sal_False;

--- 655 unchanged lines hidden ---