1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef _SD_VECTDLG_HXX
22 #define _SD_VECTDLG_HXX
24 #include <vcl/button.hxx>
25 #include <vcl/group.hxx>
26 #include <vcl/fixed.hxx>
27 #include <vcl/field.hxx>
28 #include <vcl/dialog.hxx>
29 #include <vcl/gdimtf.hxx>
30 #include <vcl/prgsbar.hxx>
31 #include <svx/graphctl.hxx>
37 /******************************************************************************
41 \******************************************************************************/
43 class SdVectorizeDlg
: public ModalDialog
45 ::sd::DrawDocShell
* mpDocSh
;
46 FixedLine aGrpSettings
;
48 NumericField aNmLayers
;
50 MetricField aMtReduce
;
51 FixedText aFtFillHoles
;
52 MetricField aMtFillHoles
;
53 CheckBox aCbFillHoles
;
55 FixedText aFtOriginal
;
58 FixedText aFtVectorized
;
65 CancelButton aBtnCancel
;
67 PushButton aBtnPreview
;
74 void SaveSettings() const;
75 void InitPreviewBmp();
76 void UpdatePreviewMtf();
78 Rectangle
GetRect( const Size
& rDispSize
, const Size
& rBmpSize
) const;
79 Bitmap
GetPreparedBitmap( Bitmap
& rBmp
, Fraction
& rScale
);
80 void Calculate( Bitmap
& rBmp
, GDIMetaFile
& rMtf
);
81 void AddTile( BitmapReadAccess
* pRAcc
, GDIMetaFile
& rMtf
,
82 long nPosX
, long nPosY
, long nWidth
, long nHeight
);
84 DECL_LINK( ProgressHdl
, void* );
85 DECL_LINK( ClickPreviewHdl
, void* );
86 DECL_LINK( ClickOKHdl
, void* );
87 DECL_LINK( ToggleHdl
, CheckBox
* );
88 DECL_LINK( ModifyHdl
, void* );
92 SdVectorizeDlg( Window
* pParent
, const Bitmap
& rBmp
, ::sd::DrawDocShell
* pDocShell
);
95 const GDIMetaFile
& GetGDIMetaFile() const { return aMtf
; }
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */