GDIMetaFile class ================= The GDIMetaFile class reads, writes, manipulates and replays metafiles via the VCL module. A typical use case is to initialize a new GDIMetaFile, open the actual stored metafile and read it in via GDIMetaFile::Read( aIStream ). This reads in the metafile into the GDIMetafile object - it can read in an old-style VCLMTF metafile (back in the days that Microsoft didn't document the metafile format this was used), as well as EMF+ files - and adds them to a list (vector) of MetaActions. You can also populate your own GDIMetaFile via AddAction(), RemoveAction(), ReplaceAction(), etc. Once the GDIMetafile object is read to be used, you can "play" the metafile, pause it, wind forward or rewind the metafile. The metafile can be moved, scaled, rotated and clipped, as well have the colours adjusted or replaced, or even made monochrome. The GDIMetafile can be used to get an OutputDevice's metafile via the Linker() and Record() functions. Using GDIMetafile ----------------- First, create a new GDIMetafile, this can be done via the default constructor. It can then be constructed manually, or you can use Record() on an OutputDevice to populate the GDIMetaFile, or of course you can read it from file with Read(). From here you can then elect to manipulate the metafile, or play it back to another GDIMetafile or to an OutputDevice via Play(). To store the file, use Write(). CONSTRUCTORS AND DESTRUCTORS - GDIMetaFile - GDIMetaFile( cosnt GDIMetaFile& rMtf ) - copy constructor - ~GDIMetaFile OPERATORS - operator = - operator == - operator != RECORDING AND PLAYBACK FUNCTIONS - Play(GDIMetaFile&, size_t) - play back metafile into another metafile up to position - Play(OutputDevice*, size_t) - play back metafile into OutputDevice up to position - Play(OutputDevice*, Point, Size, size_t) - play back metafile into OutputDevice at a particular location on the OutputDevice, up to the position in the metafile - Pause - pauses or continues the playback - IsPause - Stop - stop playback fully - WindStart - windback to start of the metafile - windPrev - windback one record - GetActionSize - get the number of records in the metafile METAFILE RECORD FUNCTIONS - FirstAction - get the first metafile record - NextAction - get the next metafile record from the current position - GetAction(size_t) - get the metafile record at location in file - GetCurAction - get the current metafile record - AddAction(MetaAction*) - appends a metafile record - AddAction(MetaAction*, size_t) - adds a metafile record to a particular location in the file - RemoveAction - removes record at file location - Clear - first stops if recording, then removes all metafile records - push_back - pushes back, basically a thin wrapper to the metafile record list READ AND WRITING - Read - Write - GetChecksum - GetSizeBytes DISPLACEMENT FUNCTIONS - Move( long nX, long nX) - Move( long nX, long nX, long nDPIX, long nDPIY ) - Move method getting specifics how to handle MapMode( MapUnit::MapPixel ) TRANSFORMATION FUNCTIONS - Scale( double fScaleX, double fScaleY ) - Scale( const Fraction& rScaleX, const Fraction& rScaleY ) - Mirror - Rotate( long nAngle10 ) - Clip( const Rectangle& ) COLOR ADJUSTMENT FUNCTIONS - Adjust - change luminance, contrast, gamma and RGB via a percentage - Convert - colour conversion - ReplaceColors - GetMonochromeMtf Related classes --------------- MetaAction: a base class used by all records. It implements a command-like pattern, and also acts as a prototype for other actions. CONSTRUCTORS AND DESTRUCTORS - MetaAction() - default constructor, sets mnRefCount to 1 and mnType, in this case MetaActionType::NONE - MetaAction(sal_uInt16 nType) - virtual constructor, sets mnType to nType, and mnRefCount to 1 - ~MetaAction COMMAND FUNCTION - Execute(OutputDevice*) - execute the functionality of the record to the OutputDevice. Part of command pattern. FACTORY FUNCTION - Clone() - prototype clone function MANIPULATION FUNCTIONS - Move(long nHorzMove, long nVerMove) - Scale(double fScaleX, double fScaleY) READ AND WRITE FUNCTIONS - Read - Write - ReadMetaAction - a static function, only used to determine which MetaAction to call on to read the record, which means that this is the function that must be used. INTROSPECTIVE FUNCTIONS - GetType A note about MetaCommentAction: ------------------------------- So this class is the most interesting - a comment record is what is used to extended metafiles, to make what we call an "Enhanced Metafile". This basically gets the OutputDevice's connect metafile and adds the record via this when it runs Execute(). It doesn't actually do anything else, unlike other MetaActions which invoke functions from OutputDevice. And if there is no connect metafile in OutputDevice, then it just does nothing at all in Execute. Everything else works as normal (Read, Write, etc). Basic pseudocode ---------------- The following illustrates an exceptionally basic and incomplete implementation of how to use GDIMetafile. An example can be found at vcl/workben/mtfdemo.cxx DemoWin::Paint() { // assume that VCL has been initialized and a new application created Window* pWin = new WorkWindow(); GDIMetaFile* pMtf = new GDIMetaFile(); SvFileStream aFileStream("example.emf", STEAM_READ); ReadWindowMetafile(aFileStream, pMtf); pMtf->Play(pWin); } istro/lhm/libreoffice-7-1+backports LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/accessibility
>
AgeCommit message (Collapse)Author
2014-09-06SfxHint: convert home-grown RTTI to normal C++ RTTINoel Grandin
Also note that I fixed a bug in SvxFontMenuControl::Notify where the if statement had the check the wrong way around. Change-Id: I611e8929c65818191e36bd80f2b985820ada4411 Reviewed-on: https://gerrit.libreoffice.org/11147 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-08-23fdo#82577: Handle KeyCodeTor Lillqvist
Put the VCL KeyCode class in the vcl namespace. Avoids clash with the X11 KeyCode typedef. Change-Id: I624c9d937f7c5f5986d313b6c5f060bd8bb7e028
2014-07-18coverity#1132662 Dereference after null checkCaolán McNamara
Change-Id: Ifbaa05e70c8958d0289047efb75a13e0b8a13a4b
2014-07-08use SimpleReferenceObject in svtools moduleNoel Grandin
to replace hand-rolled version Change-Id: I7a1048ff1ea335c3934fe7e91a09489a4d7aeb96
2014-07-08use SimpleReferenceObject in accessibilityNoel Grandin
to replace hand-rolled version Change-Id: I9dd8d02024702972722b43f2654db91eb3da3794
2014-07-04Notify screen readers when selection changes in listboxesNiklas Johansson
When you change selections in listboxes without dropdown fuctionality an accessilble event needs to be sent, this does not happen today. An example of such listbox is the Suggestions in the Spelling and Grammar dialog. Change-Id: I6100c88ae5398d8bf3f511aee7b35e88fbf151f5 Reviewed-on: https://gerrit.libreoffice.org/10087 Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2014-07-02fix some more indent and strip ::rtl::Caolán McNamara
Change-Id: I8a4f220e6e07babbb2fa8f8dcab524ba90e62986
2014-07-02Related: #i124856# guard against crashJürgen Schmidt
Patch By: hanya Review By: jsc (cherry picked from commit efe87c0d84e5f76034378d48d0d1fc2025a37645) Conflicts: accessibility/source/standard/vclxaccessiblebox.cxx Change-Id: I24fd4278406dacea33230cc1bf1528e3c5aaedf2
2014-07-02fix some mangled indentationCaolán McNamara
Change-Id: I09be3a66562e1c5c1c2b27c670672f63b0a652b0
2014-06-20hmm, that's not rightCaolán McNamara
Change-Id: Id714a54b08127c594c108c824bb0dedd74bb5c06
2014-06-20Dropdown combo-/listboxes should support accessible action togglePopupNiklas Johansson
At least VoiceOver needs it to be able to open the dropdown in a native way (through AXShowMenu). The list still isn't accessible on mac but that is an other issue. Change-Id: I825b54536dfc9743b722eb55873bde3d5eef953d Reviewed-on: https://gerrit.libreoffice.org/9833 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-06-17improve the inlinesimplememberfunctions clang pluginNoel Grandin
Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e
2014-06-16fdo#74681: quick help may be used as accessible textJacobo Aragunde Pérez
In case a tool box item does not contain some text to be used as the accessible item name, use the quick help text. Change-Id: I9caadb0989729787d8572f4007652bcab02b0412
2014-06-13loplugin:staticcallStephan Bergmann
Change-Id: Ie8e6f615b6338b736fafda92a7991642fde47b15
2014-06-10-Werror,-Wundefined-bool-conversionStephan Bergmann
Change-Id: I373d795951120d19bc7664282741d956d1ec3768
2014-06-05various: remove SAL_THROW macroNoel Grandin
Change-Id: I9464179a736b91f5bc32eb5e5e89b3b4e3da3494
vcl: ensure that VclBuilder is disposed before parent window.Michael Meeks
Move VclBuilder to use VclPtr, link to documentation, and fix more double dispose issues. Change-Id: I4900b69dbb381bd7d6fda97f2a5e623bb58e0a9f
2015-04-09vcl: VclPtr conversion in svx.Noel Grandin
Change-Id: I3a1000baa049b11728c46efbc2f0af0d8f34cf2b Conflicts: include/svx/charmap.hxx include/svx/float3d.hxx include/svx/fontwork.hxx include/svx/galctrl.hxx svx/inc/svdibrow.hxx svx/source/dialog/dlgctl3d.cxx svx/source/dialog/fontwork.cxx svx/source/engine3d/float3d.cxx svx/source/fmcomp/gridctrl.cxx svx/source/gallery2/galbrws1.cxx svx/source/inc/docrecovery.hxx
2015-04-09Resolves: tdf#90384 queue_resize needs to Invalidate the optimal cache sizeCaolán McNamara
but the PanelLayout didn't Change-Id: I38a8975f1488fa2a2ffe91b66745e1a1c6c48a28
2015-03-06Idle: Changed to new enum nameTobias Madl
Change-Id: Id3852abe9bc7bbe774331a7d691abd2a79ff59b4
2015-03-06Idle: Removed VCL_IDLE_PRIORITY_ prefix of enumTobias Madl
Change-Id: I12290bed7e4f298ab90393b8de6e2b6e7061e53f
2015-03-06idle includes and enum useJennifer Liebel
Change-Id: I8a280c54d81c7da74c9ab03ff3fc788e373ca4e4
2014-12-09changed timers to idleJennifer Liebel
Change-Id: I5846940cc45781f4a0264047107dbb568604d543
2014-09-23fdo#82577: Handle WindowNoel Grandin
Put the VCL Window class in the vcl namespace. Avoids clash with the X11 Window typedef. Change-Id: Ib1beb7ab4ad75562a42aeb252732a073d25eff1a
2014-07-15