How to create path with arrowhead?
Hello. I have a document with a single path in it. How can I apply arrowhead efect to this path? I tried using Beautiful strokes suite, but was only able to get arrowhead from existing path. How can I get one if there is no path with arrowheads in the document?
Yeah, it's really not obvious at all how to do this.
The key is to use the AIBeautifulStrokesSuite. The steps are as follows:
Get the art style of the path (AIArtStyleSuite::GetArtStyle()).
Parse the style (AIArtStyleParserSuite::NewParser(), ParseStyle()).
Get the focus stroke (AIArtStyleParserSuite::GetFocusStroke), which gets you an AIParserPaintField.
Populate the AIParserPaintField into a CPaintField (see below for code)
Use AIBeautifulStrokesSuite::SetArrowheadOptions, and pass CPaintField::GetEffectsDictionary() to the first parameter.
Call CPaintField::Save().
Create a new art style (AIArtStyleParserSuite::CreateNewStyle()).
Apply the style to the path (AIArtStyleSuite::SetArtStyle()).
Dispose of the parser (AIArtStyleParserSuite::DisposeParser()).
Note that I was only interested in the 'main' stroke so I used the focus stroke (which in 99% of cases will be the only stroke). If you want to handle multiple strokes, you can iterate over all the paint fields in the style by calling AIArtStyleParserSuite::CountPaintFields() on your parser after parsing the style. You just have to test each one to see if its a stroke or a fill, since obviously you can't apply arrowheads to fills!
The arrow head itself is set by passing in an AIPatternHandle, which is the handle to a symbol. You can set the start or end, and the other parameters are just the scale to use for the symbols and the alignment of the arrowheads (ArrowTipAlignment, found in AIBeautifulStrokes.h). The standard arrowheads are stored in an AI file in found in Support Files\Required\Resources\en_US (or whatever your language is). You get the path to this folder at runtime using AIFolders::FindFolder() and passing it kAIRequiredLocalizedResourcesFolderType. The filename is Arrowheads.ai.
If you want to read the AI file as a library, you need to use AIPathStyleSuite::ImportStyles(). You pass it the path to the AI file and it will give you an AIDocumentHandle in return. You can use this handle with methods like AISymbolSuite::GetNthSymbolPatternFromDocument(). Just be sure to retarget anything you load for your current document; to do that, you use AISymbolSuite::RetargetForCurrentDocument(). If you don't retarget the style, you'll add a reference to art that doesn't exist in your document and when you close Illustrator, it will crash (because it will try to free up the symbol twice, once for your document & once for the library you loaded, but it only existed once!).
CPaintField is a little utility class I created that basically wraps some code I was given by Adobe, so I'm happy to share it. Its useful whenever you're dealing with AIBeautifulStrokesSuite type stuff. THROW_EXCEP_IF() is a macro we use that checks error to see if its kNoErr, and if its not, we throw an exception. You can replace that with your own error checking, or just remove them, as you wish
class CPaintField {
public:
CPaintField(AIParserPaintField& paintField);
virtual ~CPaintField();
AIDictionaryRef GetEffectsDictionary() const;
void Save();
private:
ai::Ref<AIDictionaryRef> m_effectsDictionary;
ai::Ref<AILiveEffectParameters> m_newEffectParams;
AIParserPaintField& m_paintField;
AILiveEffectHandle m_paintFieldEffect;
CPaintField::CPaintField(AIParserPaintField& paintField) : m_paintField(paintField), m_paintFieldEffect(0)
ai::Ref<AIDictionaryRef> oldBSDict;
AILiveEffectParameters oldEffectParams = 0;
AIErr error = sArtStyleParser->GetPaintLiveEffectInfo(paintField, &m_paintFieldEffect, &oldEffectParams);
THROW_EXCEP_IF(error);
bool acceptsBSOptions = true;
if (oldEffectParams) {
// If an old effect parameters dictionary already exists then we need to clone it,
// so that the modifications will be done to a new art style, not to the old one.
// We don’t do this until we discover whether or not the object will accept
// Beautiful Strokes, though, because it may be that we are not modifying anything.
acceptsBSOptions = true;
AIErr error = sBeautifulStrokes->GetParamsDict(oldEffectParams, *(oldBSDict << ai::Replace));
THROW_EXCEP_IF(error);
if (acceptsBSOptions) {
// Create an empty effect params dict
AIErr error = sLiveEffect->CreateLiveEffectParameters( m_newEffectParams << ai::Replace );
THROW_EXCEP_IF(error);
// Clone all the contents of the oldEffectParams into the newEffectParams
AIErr error = sDictionary->Copy(m_newEffectParams, oldEffectParams);
THROW_EXCEP_IF(error);
} else {
// If there are no oldEffectParams, then the stroke can accept Beautiful Stroke options,
// but we will have to convert it into an active style first. We do this by creating
// a live effect param dictionary, and attaching it to the focalStroke.
AIErr error = sLiveEffect->CreateLiveEffectParameters(m_newEffectParams << ai::Replace);
THROW_EXCEP_IF(error);
AIStrokeStyle strokeStyle;
AIArtStylePaintData paintData;
AIErr error = sArtStyleParser->GetStroke(paintField, &strokeStyle, &paintData);
THROW_EXCEP_IF(error);
// It is also necessary to transfer the StrokeStyle into the effect params dictionary
// ourselves, because AIArtStyleParser doesn’t do so for us.
AIErr error = sDictionary->Set(m_newEffectParams, sDictionary->Key(kStrokeStyleKey), sEntry->FromStrokeStyle(&strokeStyle));
THROW_EXCEP_IF(error);
if (m_newEffectParams && acceptsBSOptions) {
if (oldBSDict) {
// If we had an oldBSDict, we must have one in the cloned effect params as well.
// So pull the new Beautiful Strokes parameter dictionary out of there.
AIErr error = sBeautifulStrokes->GetParamsDict(m_newEffectParams, *(m_effectsDictionary << ai::Replace));
THROW_EXCEP_IF(error);
} else {
// Insert a blank Beautiful Strokes dictionary into the new effects dictionary.
AIErr error = sBeautifulStrokes->CreateParamsDict(m_newEffectParams, *(m_effectsDictionary << ai::Replace));
THROW_EXCEP_IF(error);
CPaintField::~CPaintField()
void CPaintField::Save()
AIErr error = sArtStyleParser->SetPaintLiveEffectInfo(m_paintField, m_paintFieldEffect, m_newEffectParams);
THROW_EXCEP_IF(error);
AIDictionaryRef CPaintField::GetEffectsDictionary() const
return m_effectsDictionary;
Similar Messages
-
How to create complaints with reference to ECC Billing document (CRM 7.0)
Hi experts!
I use ECC 6.0 and CRM 7.0.
I have to create CRM complaints (ZCLR - CLRP) with reference to ecc billing documents.
I read the following topics and help:
1. How to create complaints with referenceto ECC Billing document
2. Re: How can we transfer billing documents from SAP ERP to CRM 2007?
3. http://help.sap.com/saphelp_crm70/helpdata/en/46/029ba32e675c1ae10000000a1553f6/frameset.htm
Made these settings:
1. Define the Business object type
Goto SPRO>CRM>Transaction>Settings for Complaints>Integration>Trnsaction Referencing>Define Object types for Transaction reference
2. Assign Business Object Types to Transaction Types
Goto SPRO>CRM>Transaction>Settings for Complaints>Integration>Trnsaction Referencing>Assign Business Object Types to Transaction Types
3. Implement a BADI - CRM_COPY_BADI_EXTERN.Check Implementation CRM_COPY_BADI_BILLDO for more information on the coding for referencing the ECC Billing document.
Goto SPRO>CRM>Transaction>Settings for Complaints>Integration>Trnsaction Referencing>BAdI: Create Complaint with Reference to External Transaction.
but still do not know,
1) if I should pre-replicate billing documents into CRM ?
2) Or, the system uses the RFC to find these documents in ECC to create reference?
Please help me.
Best regards Kostya.
Edited by: Kostya Khveshchenik on Oct 20, 2010 2:09 PMnot resolved =(
Edited by: Kostya Khveshchenik on Nov 19, 2010 8:50 AM -
How to create Rules with Flex Field mapping in the bpm worklist
I Have created a flex field label and was able to map to the flex field attributes .
But when i try to create a rules , I don't see the label or the flex attributes in the task payload .
Can someone please help is understanding how to create Rules with Flex Field mapping in the bpm worklist .
Even I am also searching for any scripts which will take the flex fields prompts and can directly create a label in the bpm worklist .
Any pointers or suggestion is highly appreciated .Hi,
SE38 -> Enter program
Select Variants button and display. In the next screen, enter a variant name, (If not existing , press Create to create new one), else click on Change.
Now the selection screen will display with a button "Variant Attributes" at the top.
Click on that button.
In the next screen, go to the selection variable column of the date field. Press F4 or drop down and select 'D' for date maintenance.
In the column "Name of Variable (Input Only Using F4)" press F4 or drop down, select whichever kind of date calculation you want and save the variant.
Now whenever you run the prgrm with this variant, date will be displayed by default.
Regards,
Subramanian -
How to create Matrix with Group report layout in xml
Hi,
i would be glad if anyone could tell me How to create Matrix with Group report layout in xml?
Here i am attaching the required design doc
below is the code
select COST_CMPNTCLS_CODE,
-- crd.RESOURCES,
NOMINAL_COST,
cmm.COST_MTHD_CODE,
-- crd.COST_TYPE_ID,
gps.period_code
-- ORGANIZATION_ID
from CM_RSRC_DTL crd,
gmf_period_statuses gps,
CM_MTHD_MST cmm,
CR_RSRC_MST crm,
CM_CMPT_MST ccm
where gps.period_id = crd.PERIOD_ID
and crd.cost_type_id = cmm.cost_type_id
and crd.RESOURCES = crm.RESOURCES
and crm.COST_CMPNTCLS_ID = ccm.COST_CMPNTCLS_ID
and gps.period_code in (:p_period1, :p_period2, :p_period3)
group by COST_CMPNTCLS_CODE, cmm.COST_MTHD_CODE, gps.period_code,NOMINAL_COST
order by 1,2,3,4.
The o/p of the report shoud be as given below
Period-1 Period-2 Period-3 Period-4
COMPONENT
LABOUR - DIRECT
Actual 1 2 3 4
Actual Rate 10 10 10 10
Standard Rate
Var%
DEPRICIATION-DIRECT
Actual
Actual Rate
Standard Rate
Var%
OVERHEAD - DIRECT
Actual
Actual Rate
Standard Rate
Var%
LABOUR - IN DIRECT
Actual
Actual Rate
Standard Rate
Var%
Thanks in advanceYour friend is obviously not a reliable source of HTML
information.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Mr.Ghost" <[email protected]> wrote in
message
news:f060vi$npp$[email protected]..
> One of my friends advised me to develop my whole site on
the layout mode
> as its
> better than the standard as he says
> but I couldnot make an ordinary table with rows and
columns in th layout
> mode
> is there any one who can tell me how to?
> thanx alot
> -
How to create PDF with Form Builder (T-Code:SPF) and how to use it?
How to create PDF with Form Builder (T-Code:SPF) and how to use it? Is there anyone can show me some doc. or PA material ? << removed >> Thank you very much!!
Edited by: Rob Burbank on Nov 11, 2010 1:04 PMPDF forms also known as Adobe From or Interactive Forms.
Check this link -
Interactive Forms
REG:ADOBE FORM
Adobe forms
Regards,
Amit -
How to create folder with sub folder ?
How to create folder with sub folder ?
Hi,
Questions. 17 / 17 unresolved -> very bad reputation
but ok - let's help anyway ...
1. create everything in Screen Painter
2. set FromPane and ToPane property correct.
example:
Items in MainFolder: FromPane & ToPane: 1 to 3
Items in SubFolderA (From 2 To 2) - SubFolderB (From 3 To 3)
shouldn't be that difficult
in your Code set oForm.PaneLevel when the user clicks on the Folder
lg David -
Hello everybody,
It's my first time using Java Card ^_^,I want to create a file and fill the fill with binary data.but i don't know how to create file with APDU commands,so I need help here.
I think that there must be a Manual of the JavaCard's OS in this world,can someone tell me where to download it??
Thanks.
the fllowing is my card:
Samsung S1
Model:TiEx-32J
EEPROM size:32k
Platform Version:OP 2.0.1
Card Manager Status:OP_READY
KMC:40~4F/No derivation
Message was edited by:
AllenHuangIf you look around the forum for a bit, you will see that there is no notion of file systems on JavaCards (lexdabear posted this information less than two hours ago :-)). To store files, you will have to write an applet to hold byte arrays of the required size and handle receiving and sending of these.
As for documentation, you should have a look at the GP (General Platform) specification at http://www.globalplatform.org/, which defines communication between smart cards and other devices, as well as Sun's own JavaCard pages (http://java.sun.com/products/javacard/), which contain several useful resources on JavaCards.
Message was edited by:
Lillesand -
How to create Vector with reference to Collection
hello experts,
can someone let me know how to create vector with reference to Collection interface.
Collection is an interface. and we cant create an instance of it. i'm not clear of what to pass in that constructor.
Vector v = new Vector (Collection c);
what are the possible objects of 'c'
post some example code please.
thanksEver heard of reading the javadocs?
"Collection is an interface. and we cant create an instance of it." - you don't understand interfaces, then.
// I certainly can create a Collection - here's one
Collection c = new ArrayList();
// Now I'll add some Strings to my Collection.
c.add("foo");
c.add("bar");
c.add("baz");
// Now I'll make a Vector out of it.
Vector v = new Vector(c);% -
How to create parameter with multiple selection in a query (SQ02) ?
Hi Exports
Do you know how to create parameter with multiple selection in a query (transaction SQ02)?
thanks.Hi
i know how to create user parameter at SQ02,
the question is how to create multiple selection parameter? -
How to create database with ASM
HI
How to create database with ASM?
I install vmware workstation on window XP .On virtual machine install Linux 5 enterprise (Oracle) install.
I install oracle DB software only. Also make 3 disk for ASM .
1 -- When I want to install oracle DB with ASM . In this process candidate disks not show . Why?
How I can see disks ..
so I simple install oracle DB software only.
2 -- Now I want to create database with ASM by DBCA .
What process I will follow ?
Please guide me
ThanksHi
Steps to create database with ASM.
1.Install oracle binary with active CRS(For single node installation CRS is activated when you run root.sh) .
2.Create disk without file ssytem.
3.Assign disk to raw .
4.Change owner and permission to raw devices.
5.Configure ASM manually or USing DBCA.
Manually ASM Configuration.
a.Create initialization parameter file and password file.
b.Mandatory parameter is "instance_type=asm" as per your need configure rest of parameter like db_cache_size,large_pool_size,processes,remote_login_passwordfile,shared_pool_size etc..
c.To discover disk configure "asm_diskstring=/dev/raw/raw*"
Using DBCA to configure ASM.
1.In storage type section choose ASM.It will ask for password of sysdba in 10g.
2.ASM configuration window will open -> here it create disk group -> it shows all available ASM candidate disk automatical -> choose normal redundancy,external redundancy or high redundancy.
ASM disk also can be conbfigured with ASMLIB .
If ASM disk is configured you can start asm instance in nomount state and query to v$asm_disk to see all candidate disk.V$asm_disk only shows disk which is configured in asm_diskstrings.
Hope this will help U,
Tinku -
How to create CATALOG with MS SQL Server?
Connection class has getCatalog(strCatalog) method. In order to use it, we must create CATALOG in Database?
How to create CATALOG with MS SQL Server?
Help me, please!!!You do not create these for any database, this is part of the Connection metadata.
The Catalog is the third level of table-like database object qualification as in "Catalog.Schema.Table". For SQLServer the qualification scheme is "Database.Owner.Table" and I would be surprised if they reported anything for the current connections getCatalog() method call.
What many people do is avoid table qualification altogether by setting the connection's context in a database proprietary manner and then keeping the SQL as clean as possible. For many ODBC and JDBC drivers this can be set in the configuration. For MS SQLServer you can also execute a "USE dbname" statement on the connection to avoid table qualification. -
How to Create IView with the HTML Content
Hi Friends,
Give me steps how to create IView with the static html file.
Regards,
Lakshmi Prasad.Hello thr...
follow the below link for the required steps.
[KM Document iView|http://help.sap.com/saphelp_nw04/helpdata/EN/fc/cf14bcd42911d5994400508b6b8b11/frameset.htm]
You need to upload the document onto KM. Then you will be able to create the KM Document iView.
Cheers!!!
Biroj Patro. -
How to create bdc with table control
hi all.
please some body tell me how to create bdc with table control
or suggest any www with screen shots
thanks in advance ,
aparnaHi AParna,
Its very Simple.
ALl you have to do is set up a counter based on the number of lines in the tabke. when the counter reaches the number of lines in the table hit the next page button which is at the top of every screen in SAP.
Please refer to the following BDC program I had developed using Table control,
this is for ME01 transaction.
LOOP AT T_EORD_HED.
SELECT SINGLE * FROM MARA WHERE MATNR = T_EORD_HED-MATNR.
IF SY-SUBRC = 0.
PERFORM BDC_DYNPRO USING 'SAPLMEOR' '0200'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
PERFORM BDC_FIELD USING 'EORD-MATNR'
T_EORD_HED-MATNR. "'58335'.
PERFORM BDC_FIELD USING 'EORD-WERKS'
T_EORD_HED-WERKS. "'0253'.
L_COUNT = 1.
LOOP AT T_EORD WHERE MATNR = T_EORD_HED-MATNR
AND WERKS = T_EORD_HED-WERKS.
SELECT SINGLE * FROM LFA1 WHERE LIFNR = T_EORD-LIFNR.
IF SY-SUBRC = 0.
* Look into the if condition below
IF L_COUNT = 010.
L_COUNT = 1.
PERFORM BDC_DYNPRO USING 'SAPLMEOR' '0205'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=NS'.
L_COUNT = L_COUNT + 1.
ENDIF.
PERFORM BDC_DYNPRO USING 'SAPLMEOR' '0205'.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-AUTET(01)'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'/00'.
CONCATENATE 'EORD-VDATU' '(' L_COUNT ')' INTO OPR_FIELD.
WRITE SY-DATUM TO T_EORD-VDATU.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-VDATU.
CONCATENATE 'EORD-BDATU' '(' L_COUNT ')' INTO OPR_FIELD.
WRITE T_EORD-BDATU TO V_BDATU.
PERFORM BDC_FIELD USING OPR_FIELD
V_BDATU.
CONCATENATE 'EORD-LIFNR' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-LIFNR.
CONCATENATE 'EORD-EKORG' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
'0001'.
CONCATENATE 'EORD-RESWK' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-RESWK.
WRITE T_EORD-MEINS TO V_MEINS.
CONCATENATE 'EORD-MEINS' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
V_MEINS.
* CONCATENATE 'EORD-EBELN' '(' L_COUNT ')' INTO OPR_FIELD.
* PERFORM BDC_FIELD USING 'OPR_FIELD'
* T_EORD-EBELN.
CONCATENATE 'EORD-EBELP' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-EBELP.
IF T_EORD-FLIFN NE SPACE OR T_EORD-FRESW NE SPACE OR
T_EORD-FEBEL NE SPACE.
CONCATENATE 'RM06W-FESKZ' '(' L_COUNT ')' INTO OPR1_FIELD.
PERFORM BDC_FIELD USING OPR1_FIELD
'X'.
ENDIF.
IF T_EORD-NOTKZ <> ''.
CONCATENATE 'EORD-NOTKZ' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
'X'.
ENDIF.
CONCATENATE 'EORD-AUTET' '(' L_COUNT ')' INTO OPR_FIELD.
PERFORM BDC_FIELD USING OPR_FIELD
T_EORD-AUTET.
L_COUNT = L_COUNT + 1.
ENDIF.
ENDLOOP.
PERFORM BDC_FIELD USING 'BDC_CURSOR'
'EORD-MATNR'.
PERFORM BDC_FIELD USING 'BDC_OKCODE'
'=BU'.
CALL TRANSACTION 'ME01' USING I_BDCDATA
MODE UP_MODE
* optIONS FROM l_opt
MESSAGES INTO I_BDCMSGCOLL.
PERFORM FORMAT_OUTPUT.
ENDIF.
ENDLOOP. -
How to create table with row type in smart forms
How to create table with row type in smart forms with out line type
please explain me the procedureHI,
A table type describes the structure and functional attributes of an internal table in ABAP. In ABAP programs you can reference a table type TTYP defined in the ABAP Dictionary with the command DATA <inttab> TYPE TTYP. An internal table <inttab> is created in the program with the attributes defined for TTYP in the ABAP Dictionary.
A table type is defined by:
its line type, that defines the structure and data type attributes of a line of the internal table
the options for managing and accessing the data ( access mode) in the internal table
the key ( key definition and key category) of the internal table
The row type is defined by directly entering the data type, length and number of decimal places or by referencing a data element, structured type ( structure, table or view) or other table type. Or the row type can be a reference type.
<b>for more info :</b> http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb366d358411d1829f0000e829fbfe/content.htm
Internal table
Regards
Sudheer -
How to create table with resizable row ?
how to create table with resizable row ?
I'd suggest you start here:
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html
Maybe you are looking for
-
Hi Experts, When employees are hired in mid of month or end of month with gross salary of 10000 to 15000, and they are eligible for ESI contribution, even then when running a that month payroll, the system is not deducting ESI for above said employee
-
My Apple Airport express loses connection
We have a 3-4 months old Apple airport express. When it works, it works really well. We use it for streaming shows etc on the television via Apple tv and obviously to go on the internet. We have 1 iphone 5s and 1 iphone 6, 2 iPad Air, 1 MB Air and 1
-
Multiple-node WebCenter Spaces config with default file-based policy
hi, My customer will use web center 11g on multiple linux server, I noticed there is a comment in wc doc like this: ========================================= The default file-based policy store can only be used for single-node WebCenter Spaces config
-
Im not sure if it's a fault, but I don't think so. I've just discovered that the top half of the screen drops down when double tapping the finger scanner (not the home button feature) on the iPhone 6.. Just wondered what the point of it is?!
-
Illustrator CS5.5 Tools Gone
Help! One of the students in my class has changed something on the computer and now Illustrator no longer has any Tools, Windows, Workspaces... I can't even reset them. Thanks Dave